home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 16 / IOPROG_16.ISO / soft / macaxsdk / macsdk.hqx / ActiveX DR3 SDK / ActiveX SDK / Container Common / xbinding.cpp < prev    next >
MacBinary  |  1997-08-04  |  13.0 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Aug 4 17:16:35 1997, modified Mon Aug 4 17:16:35 1997, creator 'CWIE', type ASCII, 12632 bytes "xbinding.cpp" , at 0x31d8 474 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 78 62 69 6e 64 69 | 6e 67 2e 63 70 70 00 00 |..xbindi|ng.cpp..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 31 58 00 | 00 01 da b0 0b f7 33 b0 |.....1X.|......3.|
|00000060| 0b f7 33 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..3.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 08 67 00 00 |........|.....g..|
|00000080| 2f 2f 0d 2f 2f 09 58 42 | 49 4e 44 49 4e 47 2e 43 |//.//.XB|INDING.C|
|00000090| 50 50 0d 2f 2f 0d 2f 2f | 20 3e 3e 3e 20 a9 20 31 |PP.//.//| >>> . 1|
|000000a0| 39 39 36 2d 31 39 39 37 | 20 4d 69 63 72 6f 73 6f |996-1997| Microso|
|000000b0| 66 74 20 43 6f 72 70 6f | 72 61 74 69 6f 6e 2e 20 |ft Corpo|ration. |
|000000c0| 20 41 6c 6c 20 72 69 67 | 68 74 73 20 72 65 73 65 | All rig|hts rese|
|000000d0| 72 76 65 64 2e 20 3c 3c | 3c 0d 2f 2f 0d 2f 2f 09 |rved. <<|<.//.//.|
|000000e0| 49 6d 70 6c 65 6d 65 6e | 74 73 20 74 68 65 20 61 |Implemen|ts the a|
|000000f0| 73 79 6e 63 68 72 6f 6e | 6f 75 73 20 62 69 6e 64 |synchron|ous bind|
|00000100| 69 6e 67 20 6d 6f 64 65 | 6c 20 6f 6e 20 74 6f 70 |ing mode|l on top|
|00000110| 20 6f 66 20 74 68 65 20 | 4e 65 74 73 63 61 70 65 | of the |Netscape|
|00000120| 20 70 6c 75 67 69 6e 0d | 2f 2f 09 41 50 49 73 2e | plugin.|//.APIs.|
|00000130| 0d 2f 2f 0d 0d 23 69 6e | 63 6c 75 64 65 20 22 41 |.//..#in|clude "A|
|00000140| 58 43 6f 6e 74 61 69 6e | 65 72 48 65 61 64 65 72 |XContain|erHeader|
|00000150| 73 2e 68 22 0d 0d 2f 2f | 09 44 65 66 61 75 6c 74 |s.h"..//|.Default|
|00000160| 20 46 4f 52 4d 41 54 45 | 54 43 20 74 68 61 74 20 | FORMATE|TC that |
|00000170| 69 73 20 70 61 73 73 65 | 64 20 74 6f 20 49 42 69 |is passe|d to IBi|
|00000180| 6e 64 53 74 61 74 75 73 | 43 61 6c 6c 62 61 63 6b |ndStatus|Callback|
|00000190| 3a 3a 4f 6e 44 61 74 61 | 41 76 61 69 6c 61 62 6c |::OnData|Availabl|
|000001a0| 65 2e 0d 46 4f 52 4d 41 | 54 45 54 43 20 67 5f 4e |e..FORMA|TETC g_N|
|000001b0| 75 6c 6c 46 6f 72 6d 61 | 74 45 74 63 20 3d 20 7b |ullForma|tEtc = {|
|000001c0| 0d 09 43 46 5f 4e 55 4c | 4c 2c 0d 09 4e 55 4c 4c |..CF_NUL|L,..NULL|
|000001d0| 2c 0d 09 44 56 41 53 50 | 45 43 54 5f 43 4f 4e 54 |,..DVASP|ECT_CONT|
|000001e0| 45 4e 54 2c 0d 09 2d 31 | 2c 0d 09 54 59 4d 45 44 |ENT,..-1|,..TYMED|
|000001f0| 5f 4e 55 4c 4c 0d 7d 3b | 0d 0d 4f 4c 45 43 48 41 |_NULL.};|..OLECHA|
|00000200| 52 20 67 5f 73 7a 42 53 | 43 42 48 6f 6c 64 65 72 |R g_szBS|CBHolder|
|00000210| 5b 5d 20 3d 20 22 5f 42 | 53 43 42 5f 48 6f 6c 64 |[] = "_B|SCB_Hold|
|00000220| 65 72 5f 22 3b 0d 0d 43 | 58 42 69 6e 64 69 6e 67 |er_";..C|XBinding|
|00000230| 3a 3a 7e 43 58 42 69 6e | 64 69 6e 67 28 29 0d 7b |::~CXBin|ding().{|
|00000240| 0d 09 69 66 20 28 6d 5f | 70 62 73 63 20 21 3d 20 |..if (m_|pbsc != |
|00000250| 4e 55 4c 4c 29 0d 09 09 | 6d 5f 70 62 73 63 2d 3e |NULL)...|m_pbsc->|
|00000260| 52 65 6c 65 61 73 65 28 | 29 3b 0d 7d 0d 0d 2f 2f |Release(|);.}..//|
|00000270| 0d 2f 2f 09 43 58 42 69 | 6e 64 69 6e 67 3a 3a 42 |.//.CXBi|nding::B|
|00000280| 69 6e 64 0d 2f 2f 0d 0d | 48 52 45 53 55 4c 54 0d |ind.//..|HRESULT.|
|00000290| 43 58 42 69 6e 64 69 6e | 67 3a 3a 42 69 6e 64 28 |CXBindin|g::Bind(|
|000002a0| 4c 50 4f 4c 45 53 54 52 | 20 70 73 7a 55 52 4c 2c |LPOLESTR| pszURL,|
|000002b0| 20 4c 50 42 49 4e 44 53 | 54 41 54 55 53 43 41 4c | LPBINDS|TATUSCAL|
|000002c0| 4c 42 41 43 4b 20 70 62 | 73 63 2c 20 75 6e 73 69 |LBACK pb|sc, unsi|
|000002d0| 67 6e 65 64 20 6c 6f 6e | 67 20 42 69 6e 64 54 79 |gned lon|g BindTy|
|000002e0| 70 65 29 0d 7b 0d 09 48 | 52 45 53 55 4c 54 20 68 |pe).{..H|RESULT h|
|000002f0| 72 3b 0d 09 44 57 4f 52 | 44 20 62 69 6e 64 66 3b |r;..DWOR|D bindf;|
|00000300| 0d 09 42 49 4e 44 49 4e | 46 4f 20 62 69 6e 64 69 |..BINDIN|FO bindi|
|00000310| 6e 66 6f 3b 0d 09 43 4e | 65 74 73 63 61 70 65 53 |nfo;..CN|etscapeS|
|00000320| 74 72 65 61 6d 4e 6f 74 | 69 66 79 20 2a 70 42 69 |treamNot|ify *pBi|
|00000330| 6e 64 69 6e 67 4e 6f 74 | 69 66 79 3b 0d 0d 09 2f |ndingNot|ify;.../|
|00000340| 2f 09 51 75 65 72 79 20 | 74 68 65 20 63 6c 69 65 |/.Query |the clie|
|00000350| 6e 74 20 66 6f 72 20 74 | 68 65 20 74 79 70 65 20 |nt for t|he type |
|00000360| 6f 66 20 62 69 6e 64 69 | 6e 67 20 6f 70 65 72 61 |of bindi|ng opera|
|00000370| 74 69 6f 6e 20 74 68 65 | 79 20 77 61 6e 74 2e 0d |tion the|y want..|
|00000380| 09 6d 65 6d 73 65 74 28 | 26 62 69 6e 64 69 6e 66 |.memset(|&bindinf|
|00000390| 6f 2c 20 30 2c 20 73 69 | 7a 65 6f 66 28 62 69 6e |o, 0, si|zeof(bin|
|000003a0| 64 69 6e 66 6f 29 29 3b | 0d 09 62 69 6e 64 69 6e |dinfo));|..bindin|
|000003b0| 66 6f 2e 63 62 53 69 7a | 65 20 3d 20 73 69 7a 65 |fo.cbSiz|e = size|
|000003c0| 6f 66 28 62 69 6e 64 69 | 6e 66 6f 29 3b 0d 09 70 |of(bindi|nfo);..p|
|000003d0| 62 73 63 2d 3e 47 65 74 | 42 69 6e 64 49 6e 66 6f |bsc->Get|BindInfo|
|000003e0| 28 26 62 69 6e 64 66 2c | 20 26 62 69 6e 64 69 6e |(&bindf,| &bindin|
|000003f0| 66 6f 29 3b 0d 0d 09 2f | 2f 09 42 55 47 42 55 47 |fo);.../|/.BUGBUG|
|00000400| 3a 20 20 57 68 61 74 20 | 65 78 61 63 74 6c 79 20 |: What |exactly |
|00000410| 61 72 65 20 77 65 20 73 | 75 70 70 6f 73 65 64 20 |are we s|upposed |
|00000420| 74 6f 20 64 6f 20 77 69 | 74 68 20 74 68 69 73 3f |to do wi|th this?|
|00000430| 0d 09 69 66 20 28 62 69 | 6e 64 69 6e 66 6f 2e 73 |..if (bi|ndinfo.s|
|00000440| 7a 45 78 74 72 61 49 6e | 66 6f 20 21 3d 20 4e 55 |zExtraIn|fo != NU|
|00000450| 4c 4c 29 0d 09 09 43 6f | 54 61 73 6b 4d 65 6d 46 |LL)...Co|TaskMemF|
|00000460| 72 65 65 28 62 69 6e 64 | 69 6e 66 6f 2e 73 7a 45 |ree(bind|info.szE|
|00000470| 78 74 72 61 49 6e 66 6f | 29 3b 0d 0d 09 2f 2f 09 |xtraInfo|);...//.|
|00000480| 56 65 72 69 66 79 20 74 | 68 61 74 20 74 68 65 20 |Verify t|hat the |
|00000490| 63 6c 69 65 6e 74 20 69 | 73 20 61 73 6b 69 6e 67 |client i|s asking|
|000004a0| 20 66 6f 72 20 61 6e 20 | 61 73 79 6e 63 2c 20 6e | for an |async, n|
|000004b0| 6f 6e 2d 62 6c 6f 63 6b | 69 6e 67 2c 20 70 75 73 |on-block|ing, pus|
|000004c0| 68 2d 64 61 74 61 0d 09 | 2f 2f 09 72 65 61 64 20 |h-data..|//.read |
|000004d0| 62 69 6e 64 69 6e 67 2e | 0d 09 69 66 20 28 21 28 |binding.|..if (!(|
|000004e0| 62 69 6e 64 66 20 26 20 | 42 49 4e 44 46 5f 41 53 |bindf & |BINDF_AS|
|000004f0| 59 4e 43 48 52 4f 4e 4f | 55 53 29 20 7c 7c 20 21 |YNCHRONO|US) || !|
|00000500| 28 62 69 6e 64 66 20 26 | 20 42 49 4e 44 46 5f 41 |(bindf &| BINDF_A|
|00000510| 53 59 4e 43 53 54 4f 52 | 41 47 45 29 20 7c 7c 0d |SYNCSTOR|AGE) ||.|
|00000520| 09 09 09 28 28 62 69 6e | 64 66 20 26 20 42 49 4e |...((bin|df & BIN|
|00000530| 44 46 5f 50 55 4c 4c 44 | 41 54 41 29 20 26 26 20 |DF_PULLD|ATA) && |
|00000540| 28 42 69 6e 64 54 79 70 | 65 20 3d 3d 20 54 59 4d |(BindTyp|e == TYM|
|00000550| 45 44 5f 46 49 4c 45 20 | 7c 7c 20 42 69 6e 64 54 |ED_FILE ||| BindT|
|00000560| 79 70 65 20 3d 3d 20 54 | 59 4d 45 44 5f 46 53 50 |ype == T|YMED_FSP|
|00000570| 29 29 0d 09 09 09 7c 7c | 20 28 62 69 6e 64 69 6e |))....||| (bindin|
|00000580| 66 6f 2e 64 77 42 69 6e | 64 56 65 72 62 20 21 3d |fo.dwBin|dVerb !=|
|00000590| 20 42 49 4e 44 56 45 52 | 42 5f 47 45 54 29 29 0d | BINDVER|B_GET)).|
|000005a0| 09 09 72 65 74 75 72 6e | 20 45 5f 46 41 49 4c 3b |..return| E_FAIL;|
|000005b0| 0d 0d 09 2f 2f 09 4e 6f | 74 69 66 79 20 74 68 65 |...//.No|tify the|
|000005c0| 20 63 61 6c 6c 62 61 63 | 6b 20 74 68 61 74 20 77 | callbac|k that w|
|000005d0| 65 27 72 65 20 61 62 6f | 75 74 20 74 6f 20 73 74 |e're abo|ut to st|
|000005e0| 61 72 74 20 62 69 6e 64 | 69 6e 67 2e 0d 09 68 72 |art bind|ing...hr|
|000005f0| 20 3d 20 70 62 73 63 2d | 3e 4f 6e 53 74 61 72 74 | = pbsc-|>OnStart|
|00000600| 42 69 6e 64 69 6e 67 28 | 42 53 43 4f 5f 41 4c 4c |Binding(|BSCO_ALL|
|00000610| 4f 4e 49 42 53 43 2c 20 | 28 4c 50 42 49 4e 44 49 |ONIBSC, |(LPBINDI|
|00000620| 4e 47 29 20 74 68 69 73 | 29 3b 0d 09 69 66 20 28 |NG) this|);..if (|
|00000630| 6d 5f 66 41 62 6f 72 74 | 65 64 29 0d 09 09 68 72 |m_fAbort|ed)...hr|
|00000640| 20 3d 20 45 5f 41 42 4f | 52 54 3b 0d 0d 0d 09 69 | = E_ABO|RT;....i|
|00000650| 66 20 28 53 55 43 43 45 | 45 44 45 44 28 68 72 29 |f (SUCCE|EDED(hr)|
|00000660| 29 0d 09 7b 0d 09 09 2f | 2f 09 43 72 65 61 74 65 |)..{.../|/.Create|
|00000670| 20 74 68 65 20 61 70 70 | 6f 70 72 69 61 74 65 20 | the app|opriate |
|00000680| 73 74 72 65 61 6d 20 6e | 6f 74 69 66 69 63 61 74 |stream n|otificat|
|00000690| 69 6f 6e 20 6f 62 6a 65 | 63 74 2e 0d 09 09 69 66 |ion obje|ct....if|
|000006a0| 20 28 42 69 6e 64 54 79 | 70 65 20 3d 3d 20 54 59 | (BindTy|pe == TY|
|000006b0| 4d 45 44 5f 46 49 4c 45 | 20 7c 7c 20 42 69 6e 64 |MED_FILE| || Bind|
|000006c0| 54 79 70 65 20 3d 3d 20 | 54 59 4d 45 44 5f 46 53 |Type == |TYMED_FS|
|000006d0| 50 29 0d 09 09 7b 0d 09 | 09 09 70 42 69 6e 64 69 |P)...{..|..pBindi|
|000006e0| 6e 67 4e 6f 74 69 66 79 | 20 3d 20 6e 65 77 20 43 |ngNotify| = new C|
|000006f0| 42 69 6e 64 69 6e 67 46 | 69 6c 65 53 74 72 65 61 |BindingF|ileStrea|
|00000700| 6d 4e 6f 74 69 66 79 28 | 74 68 69 73 2c 20 42 69 |mNotify(|this, Bi|
|00000710| 6e 64 54 79 70 65 29 3b | 0d 09 09 7d 0d 09 09 65 |ndType);|...}...e|
|00000720| 6c 73 65 20 69 66 28 62 | 69 6e 64 66 20 26 20 42 |lse if(b|indf & B|
|00000730| 49 4e 44 46 5f 50 55 4c | 4c 44 41 54 41 29 0d 09 |INDF_PUL|LDATA)..|
|00000740| 09 7b 0d 09 09 09 70 42 | 69 6e 64 69 6e 67 4e 6f |.{....pB|indingNo|
|00000750| 74 69 66 79 20 3d 20 6e | 65 77 20 43 42 69 6e 64 |tify = n|ew CBind|
|00000760| 69 6e 67 50 75 6c 6c 53 | 74 72 65 61 6d 4e 6f 74 |ingPullS|treamNot|
|00000770| 69 66 79 28 74 68 69 73 | 29 3b 0d 09 09 7d 0d 09 |ify(this|);...}..|
|00000780| 09 65 6c 73 65 0d 09 09 | 7b 0d 09 09 09 70 42 69 |.else...|{....pBi|
|00000790| 6e 64 69 6e 67 4e 6f 74 | 69 66 79 20 3d 20 6e 65 |ndingNot|ify = ne|
|000007a0| 77 20 43 42 69 6e 64 69 | 6e 67 4d 65 6d 6f 72 79 |w CBindi|ngMemory|
|000007b0| 53 74 72 65 61 6d 4e 6f | 74 69 66 79 28 74 68 69 |StreamNo|tify(thi|
|000007c0| 73 29 3b 0d 09 09 7d 0d | 0d 09 09 69 66 20 28 28 |s);...}.|...if ((|
|000007d0| 70 42 69 6e 64 69 6e 67 | 4e 6f 74 69 66 79 20 3d |pBinding|Notify =|
|000007e0| 3d 20 4e 55 4c 4c 29 20 | 7c 7c 0d 09 09 09 28 28 |= NULL) |||....((|
|000007f0| 70 42 69 6e 64 69 6e 67 | 4e 6f 74 69 66 79 2d 3e |pBinding|Notify->|
|00000800| 6d 5f 70 73 7a 55 52 4c | 20 3d 20 4f 6c 65 53 74 |m_pszURL| = OleSt|
|00000810| 72 64 75 70 28 70 73 7a | 55 52 4c 29 29 20 3d 3d |rdup(psz|URL)) ==|
|00000820| 20 4e 55 4c 4c 29 29 0d | 09 09 7b 0d 09 09 09 68 | NULL)).|..{....h|
|00000830| 72 20 3d 20 45 5f 4f 55 | 54 4f 46 4d 45 4d 4f 52 |r = E_OU|TOFMEMOR|
|00000840| 59 3b 0d 09 09 7d 0d 23 | 69 66 64 65 66 20 50 4c |Y;...}.#|ifdef PL|
|00000850| 55 47 49 4e 5f 41 44 41 | 50 54 45 52 0d 09 09 65 |UGIN_ADA|PTER...e|
|00000860| 6c 73 65 20 69 66 20 28 | 4e 50 4e 5f 47 65 74 55 |lse if (|NPN_GetU|
|00000870| 52 4c 28 28 4e 50 50 29 | 20 6d 5f 70 53 69 74 65 |RL((NPP)| m_pSite|
|00000880| 2d 3e 47 65 74 43 6c 69 | 65 6e 74 53 69 74 65 49 |->GetCli|entSiteI|
|00000890| 44 28 29 2c 0d 09 09 09 | 70 42 69 6e 64 69 6e 67 |D(),....|pBinding|
|000008a0| 4e 6f 74 69 66 79 2d 3e | 6d 5f 70 73 7a 55 52 4c |Notify->|m_pszURL|
|000008b0| 2c 20 4e 55 4c 4c 29 20 | 21 3d 20 4e 50 45 52 52 |, NULL) |!= NPERR|
|000008c0| 5f 4e 4f 5f 45 52 52 4f | 52 29 0d 23 65 6c 69 66 |_NO_ERRO|R).#elif|
|000008d0| 20 64 65 66 69 6e 65 64 | 28 55 52 4c 4d 4f 4e 5f | defined|(URLMON_|
|000008e0| 44 4c 4c 29 0d 09 09 65 | 6c 73 65 20 69 66 20 28 |DLL)...e|lse if (|
|000008f0| 41 58 47 65 74 55 72 6c | 28 20 70 42 69 6e 64 69 |AXGetUrl|( pBindi|
|00000900| 6e 67 4e 6f 74 69 66 79 | 2d 3e 6d 5f 70 73 7a 55 |ngNotify|->m_pszU|
|00000910| 52 4c 2c 20 70 42 69 6e | 64 69 6e 67 4e 6f 74 69 |RL, pBin|dingNoti|
|00000920| 66 79 2c 0d 09 09 09 09 | 09 42 69 6e 64 54 79 70 |fy,.....|.BindTyp|
|00000930| 65 20 3d 3d 20 54 59 4d | 45 44 5f 46 49 4c 45 20 |e == TYM|ED_FILE |
|00000940| 7c 7c 20 42 69 6e 64 54 | 79 70 65 20 3d 3d 20 54 ||| BindT|ype == T|
|00000950| 59 4d 45 44 5f 46 53 50 | 29 20 21 3d 20 4e 50 45 |YMED_FSP|) != NPE|
|00000960| 52 52 5f 4e 4f 5f 45 52 | 52 4f 52 29 20 0d 23 65 |RR_NO_ER|ROR) .#e|
|00000970| 6c 73 65 20 0d 09 09 65 | 6c 73 65 20 69 66 20 28 |lse ...e|lse if (|
|00000980| 41 58 45 5f 47 65 74 55 | 52 4c 28 28 4e 50 50 29 |AXE_GetU|RL((NPP)|
|00000990| 20 6d 5f 70 53 69 74 65 | 2d 3e 6d 5f 43 6c 69 65 | m_pSite|->m_Clie|
|000009a0| 6e 74 49 6e 73 74 61 6e | 63 65 2c 0d 09 09 09 70 |ntInstan|ce,....p|
|000009b0| 42 69 6e 64 69 6e 67 4e | 6f 74 69 66 79 2d 3e 6d |BindingN|otify->m|
|000009c0| 5f 70 73 7a 55 52 4c 2c | 20 4e 55 4c 4c 2c 20 70 |_pszURL,| NULL, p|
|000009d0| 42 69 6e 64 69 6e 67 4e | 6f 74 69 66 79 29 20 21 |BindingN|otify) !|
|000009e0| 3d 20 4e 50 45 52 52 5f | 4e 4f 5f 45 52 52 4f 52 |= NPERR_|NO_ERROR|
|000009f0| 29 20 0d 23 65 6e 64 69 | 66 0d 09 09 7b 0d 09 09 |) .#endi|f...{...|
|00000a00| 09 64 65 6c 65 74 65 20 | 70 42 69 6e 64 69 6e 67 |.delete |pBinding|
|00000a10| 4e 6f 74 69 66 79 3b 0d | 09 09 09 70 42 69 6e 64 |Notify;.|...pBind|
|00000a20| 69 6e 67 4e 6f 74 69 66 | 79 20 3d 20 4e 55 4c 4c |ingNotif|y = NULL|
|00000a30| 3b 0d 09 09 09 68 72 20 | 3d 20 45 5f 46 41 49 4c |;....hr |= E_FAIL|
|00000a40| 3b 0d 09 09 7d 20 65 6c | 73 65 20 7b 0d 23 69 66 |;...} el|se {.#if|
|00000a50| 64 65 66 20 50 4c 55 47 | 49 4e 5f 41 44 41 50 54 |def PLUG|IN_ADAPT|
|00000a60| 45 52 0d 09 09 09 2f 2f | 09 4c 69 6e 6b 20 74 68 |ER....//|.Link th|
|00000a70| 65 20 6e 6f 74 69 66 69 | 63 61 74 69 6f 6e 20 6f |e notifi|cation o|
|00000a80| 62 6a 65 63 74 20 74 6f | 20 74 68 65 20 6c 69 73 |bject to| the lis|
|00000a90| 74 20 6f 66 20 6f 62 6a | 65 63 74 73 20 77 61 69 |t of obj|ects wai|
|00000aa0| 74 69 6e 67 20 74 6f 0d | 09 09 09 2f 2f 09 62 65 |ting to.|...//.be|
|00000ab0| 20 62 6f 75 6e 64 2e 0d | 09 09 09 70 42 69 6e 64 | bound..|...pBind|
|00000ac0| 69 6e 67 4e 6f 74 69 66 | 79 2d 3e 6d 5f 70 4e 65 |ingNotif|y->m_pNe|
|00000ad0| 78 74 55 6e 61 74 74 61 | 63 68 65 64 20 3d 20 6d |xtUnatta|ched = m|
|00000ae0| 5f 70 53 69 74 65 2d 3e | 6d 5f 70 55 6e 61 74 74 |_pSite->|m_pUnatt|
|00000af0| 61 63 68 65 64 4c 69 73 | 74 3b 0d 09 09 09 6d 5f |achedLis|t;....m_|
|00000b00| 70 53 69 74 65 2d 3e 6d | 5f 70 55 6e 61 74 74 61 |pSite->m|_pUnatta|
|00000b10| 63 68 65 64 4c 69 73 74 | 20 3d 20 70 42 69 6e 64 |chedList| = pBind|
|00000b20| 69 6e 67 4e 6f 74 69 66 | 79 3b 0d 23 65 6e 64 69 |ingNotif|y;.#endi|
|00000b30| 66 0d 0d 09 09 09 6d 5f | 70 62 73 63 20 3d 20 70 |f.....m_|pbsc = p|
|00000b40| 62 73 63 3b 0d 09 09 09 | 6d 5f 70 62 73 63 2d 3e |bsc;....|m_pbsc->|
|00000b50| 41 64 64 52 65 66 28 29 | 3b 0d 0d 09 09 09 2f 2f |AddRef()|;.....//|
|00000b60| 09 52 65 73 75 6c 74 20 | 69 6e 64 69 63 61 74 65 |.Result |indicate|
|00000b70| 73 20 74 68 61 74 20 77 | 65 27 72 65 20 69 6e 20 |s that w|e're in |
|00000b80| 74 68 65 20 70 72 6f 63 | 65 73 73 20 6f 66 20 62 |the proc|ess of b|
|00000b90| 69 6e 64 69 6e 67 2c 20 | 6e 6f 74 20 61 6e 20 65 |inding, |not an e|
|00000ba0| 72 72 6f 72 2e 0d 09 09 | 09 68 72 20 3d 20 4d 4b |rror....|.hr = MK|
|00000bb0| 5f 53 5f 41 53 59 4e 43 | 48 52 4f 4e 4f 55 53 3b |_S_ASYNC|HRONOUS;|
|00000bc0| 0d 09 09 7d 0d 09 7d 0d | 0d 09 2f 2f 09 49 66 20 |...}..}.|..//.If |
|00000bd0| 66 6f 72 20 61 6e 79 20 | 72 65 61 73 6f 6e 20 77 |for any |reason w|
|00000be0| 65 27 72 65 20 67 6f 69 | 6e 67 20 74 6f 20 72 65 |e're goi|ng to re|
|00000bf0| 74 75 72 6e 20 45 5f 50 | 45 4e 44 49 4e 47 2c 20 |turn E_P|ENDING, |
|00000c00| 77 65 20 6e 65 65 64 20 | 74 6f 20 63 61 6c 6c 0d |we need |to call.|
|00000c10| 09 2f 2f 09 4f 6e 53 74 | 6f 70 42 69 6e 64 69 6e |.//.OnSt|opBindin|
|00000c20| 67 20 61 6e 64 20 6e 6f | 74 69 66 79 20 69 74 20 |g and no|tify it |
|00000c30| 6f 66 20 74 68 65 20 65 | 72 72 6f 72 2e 0d 09 69 |of the e|rror...i|
|00000c40| 66 20 28 68 72 20 21 3d | 20 4d 4b 5f 53 5f 41 53 |f (hr !=| MK_S_AS|
|00000c50| 59 4e 43 48 52 4f 4e 4f | 55 53 29 20 7b 0d 09 09 |YNCHRONO|US) {...|
|00000c60| 70 62 73 63 2d 3e 4f 6e | 53 74 6f 70 42 69 6e 64 |pbsc->On|StopBind|
|00000c70| 69 6e 67 28 68 72 2c 20 | 4e 55 4c 4c 29 3b 0d 09 |ing(hr, |NULL);..|
|00000c80| 7d 0d 0d 09 72 65 74 75 | 72 6e 20 68 72 3b 0d 7d |}...retu|rn hr;.}|
|00000c90| 0d 0d 2f 2f 0d 2f 2f 09 | 43 58 42 69 6e 64 69 6e |..//.//.|CXBindin|
|00000ca0| 67 3a 3a 49 55 6e 6b 6e | 6f 77 6e 3a 3a 51 75 65 |g::IUnkn|own::Que|
|00000cb0| 72 79 49 6e 74 65 72 66 | 61 63 65 0d 2f 2f 0d 2f |ryInterf|ace.//./|
|00000cc0| 2f 09 52 65 74 75 72 6e | 73 20 61 20 70 6f 69 6e |/.Return|s a poin|
|00000cd0| 74 65 72 20 74 6f 20 74 | 68 65 20 73 70 65 63 69 |ter to t|he speci|
|00000ce0| 66 69 65 64 20 69 6e 74 | 65 72 66 61 63 65 20 6f |fied int|erface o|
|00000cf0| 6e 20 61 20 63 6f 6d 70 | 6f 6e 65 6e 74 20 74 6f |n a comp|onent to|
|00000d00| 20 77 68 69 63 68 20 61 | 0d 2f 2f 09 63 6c 69 65 | which a|.//.clie|
|00000d10| 6e 74 20 63 75 72 72 65 | 6e 74 6c 79 20 68 6f 6c |nt curre|ntly hol|
|00000d20| 64 73 20 61 6e 20 69 6e | 74 65 72 66 61 63 65 20 |ds an in|terface |
|00000d30| 70 6f 69 6e 74 65 72 2e | 0d 2f 2f 0d 0d 53 54 44 |pointer.|.//..STD|
|00000d40| 4d 45 54 48 4f 44 49 4d | 50 0d 43 58 42 69 6e 64 |METHODIM|P.CXBind|
|00000d50| 69 6e 67 3a 3a 51 75 65 | 72 79 49 6e 74 65 72 66 |ing::Que|ryInterf|
|00000d60| 61 63 65 28 52 45 46 49 | 49 44 20 72 69 69 64 2c |ace(REFI|ID riid,|
|00000d70| 20 4c 50 56 4f 49 44 20 | 2a 70 70 76 4f 62 6a 29 | LPVOID |*ppvObj)|
|00000d80| 0d 7b 0d 09 48 52 45 53 | 55 4c 54 20 68 72 3b 0d |.{..HRES|ULT hr;.|
|00000d90| 09 4c 50 56 4f 49 44 20 | 70 76 3b 0d 0d 09 69 66 |.LPVOID |pv;...if|
|00000da0| 20 28 72 69 69 64 20 3d | 3d 20 49 49 44 5f 49 55 | (riid =|= IID_IU|
|00000db0| 6e 6b 6e 6f 77 6e 20 7c | 7c 20 72 69 69 64 20 3d |nknown ||| riid =|
|00000dc0| 3d 20 49 49 44 5f 49 42 | 69 6e 64 69 6e 67 29 20 |= IID_IB|inding) |
|00000dd0| 7b 0d 09 09 70 76 20 3d | 20 28 4c 50 56 4f 49 44 |{...pv =| (LPVOID|
|00000de0| 29 28 4c 50 42 49 4e 44 | 43 54 58 29 20 74 68 69 |)(LPBIND|CTX) thi|
|00000df0| 73 3b 0d 09 09 2b 2b 6d | 5f 63 52 65 66 3b 0d 09 |s;...++m|_cRef;..|
|00000e00| 09 68 72 20 3d 20 53 5f | 4f 4b 3b 0d 09 7d 20 65 |.hr = S_|OK;..} e|
|00000e10| 6c 73 65 20 7b 0d 09 09 | 70 76 20 3d 20 4e 55 4c |lse {...|pv = NUL|
|00000e20| 4c 3b 0d 09 09 68 72 20 | 3d 20 45 5f 4e 4f 49 4e |L;...hr |= E_NOIN|
|00000e30| 54 45 52 46 41 43 45 3b | 0d 09 7d 0d 0d 09 2a 70 |TERFACE;|..}...*p|
|00000e40| 70 76 4f 62 6a 20 3d 20 | 70 76 3b 0d 09 72 65 74 |pvObj = |pv;..ret|
|00000e50| 75 72 6e 20 68 72 3b 0d | 7d 0d 0d 2f 2f 0d 2f 2f |urn hr;.|}..//.//|
|00000e60| 09 43 58 42 69 6e 64 69 | 6e 67 3a 3a 49 55 6e 6b |.CXBindi|ng::IUnk|
|00000e70| 6e 6f 77 6e 3a 3a 41 64 | 64 52 65 66 0d 2f 2f 0d |nown::Ad|dRef.//.|
|00000e80| 2f 2f 09 49 6e 63 72 65 | 6d 65 6e 74 73 20 74 68 |//.Incre|ments th|
|00000e90| 65 20 72 65 66 65 72 65 | 6e 63 65 20 63 6f 75 6e |e refere|nce coun|
|00000ea0| 74 20 66 6f 72 20 74 68 | 65 20 63 61 6c 6c 69 6e |t for th|e callin|
|00000eb0| 67 20 69 6e 74 65 72 66 | 61 63 65 2e 0d 2f 2f 0d |g interf|ace..//.|
|00000ec0| 0d 53 54 44 4d 45 54 48 | 4f 44 49 4d 50 5f 28 55 |.STDMETH|ODIMP_(U|
|00000ed0| 4c 4f 4e 47 29 0d 43 58 | 42 69 6e 64 69 6e 67 3a |LONG).CX|Binding:|
|00000ee0| 3a 41 64 64 52 65 66 28 | 76 6f 69 64 29 0d 7b 0d |:AddRef(|void).{.|
|00000ef0| 09 72 65 74 75 72 6e 20 | 2b 2b 6d 5f 63 52 65 66 |.return |++m_cRef|
|00000f00| 3b 0d 7d 0d 0d 2f 2f 0d | 2f 2f 09 43 58 42 69 6e |;.}..//.|//.CXBin|
|00000f10| 64 69 6e 67 3a 3a 49 55 | 6e 6b 6e 6f 77 6e 3a 3a |ding::IU|nknown::|
|00000f20| 52 65 6c 65 61 73 65 0d | 2f 2f 0d 2f 2f 09 44 65 |Release.|//.//.De|
|00000f30| 63 72 65 6d 65 6e 74 73 | 20 74 68 65 20 72 65 66 |crements| the ref|
|00000f40| 65 72 65 6e 63 65 20 63 | 6f 75 6e 74 20 66 6f 72 |erence c|ount for|
|00000f50| 20 74 68 65 20 63 61 6c | 6c 69 6e 67 20 69 6e 74 | the cal|ling int|
|00000f60| 65 72 66 61 63 65 20 6f | 6e 20 61 20 6f 62 6a 65 |erface o|n a obje|
|00000f70| 63 74 2e 20 20 49 66 0d | 2f 2f 09 74 68 65 20 72 |ct. If.|//.the r|
|00000f80| 65 66 65 72 65 6e 63 65 | 20 63 6f 75 6e 74 20 6f |eference| count o|
|00000f90| 6e 20 74 68 65 20 6f 62 | 6a 65 63 74 20 66 61 6c |n the ob|ject fal|
|00000fa0| 6c 73 20 74 6f 20 7a 65 | 72 6f 2c 20 74 68 65 20 |ls to ze|ro, the |
|00000fb0| 6f 62 6a 65 63 74 20 69 | 73 20 66 72 65 65 64 2e |object i|s freed.|
|00000fc0| 0d 2f 2f 0d 0d 53 54 44 | 4d 45 54 48 4f 44 49 4d |.//..STD|METHODIM|
|00000fd0| 50 5f 28 55 4c 4f 4e 47 | 29 0d 43 58 42 69 6e 64 |P_(ULONG|).CXBind|
|00000fe0| 69 6e 67 3a 3a 52 65 6c | 65 61 73 65 28 76 6f 69 |ing::Rel|ease(voi|
|00000ff0| 64 29 0d 7b 0d 09 69 66 | 20 28 2d 2d 6d 5f 63 52 |d).{..if| (--m_cR|
|00001000| 65 66 20 21 3d 20 30 29 | 0d 09 09 72 65 74 75 72 |ef != 0)|...retur|
|00001010| 6e 20 6d 5f 63 52 65 66 | 3b 0d 0d 09 64 65 6c 65 |n m_cRef|;...dele|
|00001020| 74 65 20 74 68 69 73 3b | 0d 09 72 65 74 75 72 6e |te this;|..return|
|00001030| 20 30 3b 0d 7d 0d 0d 2f | 2f 0d 2f 2f 09 43 58 42 | 0;.}../|/.//.CXB|
|00001040| 69 6e 64 69 6e 67 3a 3a | 49 42 69 6e 64 69 6e 67 |inding::|IBinding|
|00001050| 3a 3a 41 62 6f 72 74 0d | 2f 2f 0d 2f 2f 09 50 65 |::Abort.|//.//.Pe|
|00001060| 72 6d 61 6e 65 6e 74 6c | 79 20 61 62 6f 72 74 73 |rmanentl|y aborts|
|00001070| 20 74 68 65 20 62 69 6e | 64 20 6f 70 65 72 61 74 | the bin|d operat|
|00001080| 69 6f 6e 2e 0d 2f 2f 0d | 0d 53 54 44 4d 45 54 48 |ion..//.|.STDMETH|
|00001090| 4f 44 49 4d 50 0d 43 58 | 42 69 6e 64 69 6e 67 3a |ODIMP.CX|Binding:|
|000010a0| 3a 41 62 6f 72 74 28 76 | 6f 69 64 29 0d 7b 0d 09 |:Abort(v|oid).{..|
|000010b0| 48 52 45 53 55 4c 54 20 | 68 72 3b 0d 0d 09 2f 2f |HRESULT |hr;...//|
|000010c0| 09 54 68 65 20 62 69 6e | 64 69 6e 67 20 6f 70 65 |.The bin|ding ope|
|000010d0| 72 61 74 69 6f 6e 20 77 | 69 6c 6c 20 62 65 20 61 |ration w|ill be a|
|000010e0| 62 6f 72 74 65 64 20 69 | 6e 73 69 64 65 20 74 68 |borted i|nside th|
|000010f0| 65 20 58 78 78 3a 3a 4f | 6e 57 72 69 74 65 20 6d |e Xxx::O|nWrite m|
|00001100| 65 74 68 6f 64 2e 0d 09 | 2f 2f 09 41 73 20 64 6f |ethod...|//.As do|
|00001110| 63 75 6d 65 6e 74 65 64 | 20 69 6e 20 74 68 65 20 |cumented| in the |
|00001120| 22 41 73 79 6e 63 68 72 | 6f 6e 6f 75 73 20 4d 6f |"Asynchr|onous Mo|
|00001130| 6e 69 6b 65 72 22 20 73 | 70 65 63 2c 20 74 68 65 |niker" s|pec, the|
|00001140| 20 63 6c 69 65 6e 74 20 | 6d 61 79 0d 09 2f 2f 09 | client |may..//.|
|00001150| 63 6f 6e 74 69 6e 75 65 | 20 74 6f 20 72 65 63 65 |continue| to rece|
|00001160| 69 76 65 20 63 61 6c 6c | 62 61 63 6b 20 6e 6f 74 |ive call|back not|
|00001170| 69 66 69 63 61 74 69 6f | 6e 73 2c 20 73 6f 20 77 |ificatio|ns, so w|
|00001180| 65 20 63 61 6e 20 64 6f | 20 74 68 69 73 20 61 74 |e can do| this at|
|00001190| 20 6f 75 72 0d 09 2f 2f | 09 65 61 72 6c 69 65 73 | our..//|.earlies|
|000011a0| 74 20 63 6f 6e 76 65 6e | 69 65 6e 63 65 2e 0d 09 |t conven|ience...|
|000011b0| 69 66 20 28 21 6d 5f 66 | 41 62 6f 72 74 65 64 29 |if (!m_f|Aborted)|
|000011c0| 20 7b 0d 09 09 6d 5f 66 | 41 62 6f 72 74 65 64 20 | {...m_f|Aborted |
|000011d0| 3d 20 54 52 55 45 3b 0d | 09 09 68 72 20 3d 20 53 |= TRUE;.|..hr = S|
|000011e0| 5f 4f 4b 3b 0d 09 7d 20 | 65 6c 73 65 20 7b 0d 09 |_OK;..} |else {..|
|000011f0| 09 68 72 20 3d 20 53 5f | 46 41 4c 53 45 3b 0d 09 |.hr = S_|FALSE;..|
|00001200| 7d 0d 0d 09 72 65 74 75 | 72 6e 20 68 72 3b 0d 7d |}...retu|rn hr;.}|
|00001210| 0d 0d 2f 2f 0d 2f 2f 09 | 43 58 42 69 6e 64 69 6e |..//.//.|CXBindin|
|00001220| 67 3a 3a 49 42 69 6e 64 | 69 6e 67 3a 3a 53 75 73 |g::IBind|ing::Sus|
|00001230| 70 65 6e 64 0d 2f 2f 0d | 2f 2f 09 53 75 73 70 65 |pend.//.|//.Suspe|
|00001240| 6e 64 73 20 74 68 65 20 | 62 69 6e 64 20 6f 70 65 |nds the |bind ope|
|00001250| 72 61 74 69 6f 6e 20 75 | 6e 74 69 6c 20 72 65 73 |ration u|ntil res|
|00001260| 75 6d 65 64 20 62 79 20 | 61 20 63 61 6c 6c 20 74 |umed by |a call t|
|00001270| 6f 20 49 42 69 6e 64 69 | 6e 67 3a 3a 52 65 73 75 |o IBindi|ng::Resu|
|00001280| 6d 65 20 6f 72 0d 2f 2f | 09 61 62 6f 72 74 65 64 |me or.//|.aborted|
|00001290| 20 62 79 20 61 20 63 61 | 6c 6c 20 74 6f 20 49 42 | by a ca|ll to IB|
|000012a0| 69 6e 64 69 6e 67 3a 3a | 41 62 6f 72 74 2e 0d 2f |inding::|Abort../|
|000012b0| 2f 0d 0d 53 54 44 4d 45 | 54 48 4f 44 49 4d 50 0d |/..STDME|THODIMP.|
|000012c0| 43 58 42 69 6e 64 69 6e | 67 3a 3a 53 75 73 70 65 |CXBindin|g::Suspe|
|000012d0| 6e 64 28 76 6f 69 64 29 | 0d 7b 0d 09 2f 2f 09 53 |nd(void)|.{..//.S|
|000012e0| 75 73 70 65 6e 64 2f 72 | 65 73 75 6d 65 20 6e 6f |uspend/r|esume no|
|000012f0| 74 20 73 75 70 70 6f 72 | 74 65 64 2e 0d 09 72 65 |t suppor|ted...re|
|00001300| 74 75 72 6e 20 45 5f 4e | 4f 54 49 4d 50 4c 3b 0d |turn E_N|OTIMPL;.|
|00001310| 7d 0d 0d 2f 2f 0d 2f 2f | 09 43 58 42 69 6e 64 69 |}..//.//|.CXBindi|
|00001320| 6e 67 3a 3a 49 42 69 6e | 64 69 6e 67 3a 3a 52 65 |ng::IBin|ding::Re|
|00001330| 73 75 6d 65 0d 2f 2f 0d | 2f 2f 09 52 65 73 75 6d |sume.//.|//.Resum|
|00001340| 65 73 20 61 20 62 69 6e | 64 69 6e 67 20 6f 70 65 |es a bin|ding ope|
|00001350| 72 61 74 69 6f 6e 20 74 | 68 61 74 20 77 61 73 20 |ration t|hat was |
|00001360| 73 75 73 70 65 6e 64 65 | 64 20 62 79 20 61 20 63 |suspende|d by a c|
|00001370| 61 6c 6c 20 74 6f 0d 2f | 2f 09 49 42 69 6e 64 69 |all to./|/.IBindi|
|00001380| 6e 67 3a 3a 53 75 73 70 | 65 6e 64 2e 0d 2f 2f 0d |ng::Susp|end..//.|
|00001390| 0d 53 54 44 4d 45 54 48 | 4f 44 49 4d 50 0d 43 58 |.STDMETH|ODIMP.CX|
|000013a0| 42 69 6e 64 69 6e 67 3a | 3a 52 65 73 75 6d 65 28 |Binding:|:Resume(|
|000013b0| 76 6f 69 64 29 0d 7b 0d | 09 2f 2f 09 53 75 73 70 |void).{.|.//.Susp|
|000013c0| 65 6e 64 2f 72 65 73 75 | 6d 65 20 6e 6f 74 20 73 |end/resu|me not s|
|000013d0| 75 70 70 6f 72 74 65 64 | 2e 0d 09 72 65 74 75 72 |upported|...retur|
|000013e0| 6e 20 45 5f 4e 4f 54 49 | 4d 50 4c 3b 0d 7d 0d 0d |n E_NOTI|MPL;.}..|
|000013f0| 2f 2f 0d 2f 2f 09 43 58 | 42 69 6e 64 69 6e 67 3a |//.//.CX|Binding:|
|00001400| 3a 49 42 69 6e 64 69 6e | 67 3a 3a 53 65 74 50 72 |:IBindin|g::SetPr|
|00001410| 69 6f 72 69 74 79 0d 2f | 2f 0d 2f 2f 09 45 73 74 |iority./|/.//.Est|
|00001420| 61 62 6c 69 73 68 65 73 | 20 74 68 65 20 70 72 69 |ablishes| the pri|
|00001430| 6f 72 69 74 79 20 66 6f | 72 20 74 68 65 20 62 69 |ority fo|r the bi|
|00001440| 6e 64 20 6f 70 65 72 61 | 74 69 6f 6e 2e 0d 2f 2f |nd opera|tion..//|
|00001450| 0d 0d 53 54 44 4d 45 54 | 48 4f 44 49 4d 50 0d 43 |..STDMET|HODIMP.C|
|00001460| 58 42 69 6e 64 69 6e 67 | 3a 3a 53 65 74 50 72 69 |XBinding|::SetPri|
|00001470| 6f 72 69 74 79 28 4c 4f | 4e 47 20 6e 50 72 69 6f |ority(LO|NG nPrio|
|00001480| 72 69 74 79 29 0d 7b 0d | 23 70 72 61 67 6d 61 20 |rity).{.|#pragma |
|00001490| 75 6e 75 73 65 64 20 28 | 6e 50 72 69 6f 72 69 74 |unused (|nPriorit|
|000014a0| 79 29 0d 09 2f 2f 09 50 | 72 69 6f 72 69 74 79 20 |y)..//.P|riority |
|000014b0| 63 61 6e 6e 6f 74 20 62 | 65 20 63 6f 6e 74 72 6f |cannot b|e contro|
|000014c0| 6c 6c 65 64 2e 0d 09 72 | 65 74 75 72 6e 20 45 5f |lled...r|eturn E_|
|000014d0| 4e 4f 54 49 4d 50 4c 3b | 0d 7d 0d 0d 2f 2f 0d 2f |NOTIMPL;|.}..//./|
|000014e0| 2f 09 43 58 42 69 6e 64 | 69 6e 67 3a 3a 49 42 69 |/.CXBind|ing::IBi|
|000014f0| 6e 64 69 6e 67 3a 3a 47 | 65 74 50 72 69 6f 72 69 |nding::G|etPriori|
|00001500| 74 79 0d 2f 2f 0d 2f 2f | 09 52 65 74 72 69 65 76 |ty.//.//|.Retriev|
|00001510| 65 73 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 70 |es the c|urrent p|
|00001520| 72 69 6f 72 69 74 79 20 | 6f 66 20 74 68 69 73 20 |riority |of this |
|00001530| 62 69 6e 64 20 6f 70 65 | 72 61 74 69 6f 6e 2e 0d |bind ope|ration..|
|00001540| 2f 2f 0d 0d 53 54 44 4d | 45 54 48 4f 44 49 4d 50 |//..STDM|ETHODIMP|
|00001550| 0d 43 58 42 69 6e 64 69 | 6e 67 3a 3a 47 65 74 50 |.CXBindi|ng::GetP|
|00001560| 72 69 6f 72 69 74 79 28 | 4c 4f 4e 47 20 2a 70 6e |riority(|LONG *pn|
|00001570| 50 72 69 6f 72 69 74 79 | 29 0d 7b 0d 09 2f 2f 09 |Priority|).{..//.|
|00001580| 50 72 69 6f 72 69 74 79 | 20 63 61 6e 6e 6f 74 20 |Priority| cannot |
|00001590| 62 65 20 63 6f 6e 74 72 | 6f 6c 6c 65 64 2e 0d 09 |be contr|olled...|
|000015a0| 2a 70 6e 50 72 69 6f 72 | 69 74 79 20 3d 20 30 3b |*pnPrior|ity = 0;|
|000015b0| 09 09 09 09 09 2f 2f 09 | 54 48 52 45 41 44 5f 50 |.....//.|THREAD_P|
|000015c0| 52 49 4f 52 49 54 59 5f | 4e 4f 52 4d 41 4c 2e 0d |RIORITY_|NORMAL..|
|000015d0| 09 72 65 74 75 72 6e 20 | 45 5f 4e 4f 54 49 4d 50 |.return |E_NOTIMP|
|000015e0| 4c 3b 0d 7d 0d 0d 2f 2f | 0d 2f 2f 09 43 58 42 69 |L;.}..//|.//.CXBi|
|000015f0| 6e 64 69 6e 67 3a 3a 49 | 42 69 6e 64 69 6e 67 3a |nding::I|Binding:|
|00001600| 3a 47 65 74 42 69 6e 64 | 52 65 73 75 6c 74 0d 2f |:GetBind|Result./|
|00001610| 2f 0d 2f 2f 09 51 75 65 | 72 69 65 73 20 74 68 65 |/.//.Que|ries the|
|00001620| 20 70 72 6f 74 6f 63 6f | 6c 2d 73 70 65 63 69 66 | protoco|l-specif|
|00001630| 69 63 20 6f 75 74 63 6f | 6d 65 20 6f 66 20 61 20 |ic outco|me of a |
|00001640| 62 69 6e 64 20 6f 70 65 | 72 61 74 69 6f 6e 2c 20 |bind ope|ration, |
|00001650| 74 79 70 69 63 61 6c 6c | 79 20 75 73 65 64 0d 2f |typicall|y used./|
|00001660| 2f 09 64 75 72 69 6e 67 | 20 49 42 69 6e 64 53 74 |/.during| IBindSt|
|00001670| 61 74 75 73 43 61 6c 6c | 62 61 63 6b 3a 3a 4f 6e |atusCall|back::On|
|00001680| 53 74 6f 70 42 69 6e 64 | 69 6e 67 2e 0d 2f 2f 0d |StopBind|ing..//.|
|00001690| 0d 53 54 44 4d 45 54 48 | 4f 44 49 4d 50 0d 43 58 |.STDMETH|ODIMP.CX|
|000016a0| 42 69 6e 64 69 6e 67 3a | 3a 47 65 74 42 69 6e 64 |Binding:|:GetBind|
|000016b0| 52 65 73 75 6c 74 28 4c | 50 43 4c 53 49 44 20 70 |Result(L|PCLSID p|
|000016c0| 63 6c 73 69 64 50 72 6f | 74 6f 63 6f 6c 2c 20 4c |clsidPro|tocol, L|
|000016d0| 50 44 57 4f 52 44 20 70 | 64 77 52 65 73 75 6c 74 |PDWORD p|dwResult|
|000016e0| 2c 20 4c 50 4f 4c 45 53 | 54 52 0d 09 2a 70 73 7a |, LPOLES|TR..*psz|
|000016f0| 52 65 73 75 6c 74 2c 20 | 4c 50 44 57 4f 52 44 20 |Result, |LPDWORD |
|00001700| 70 64 77 52 65 73 65 72 | 76 65 64 29 0d 7b 0d 23 |pdwReser|ved).{.#|
|00001710| 70 72 61 67 6d 61 20 75 | 6e 75 73 65 64 20 28 70 |pragma u|nused (p|
|00001720| 63 6c 73 69 64 50 72 6f | 74 6f 63 6f 6c 2c 20 70 |clsidPro|tocol, p|
|00001730| 64 77 52 65 73 65 72 76 | 65 64 29 0d 09 2f 2f 09 |dwReserv|ed)..//.|
|00001740| 57 65 20 64 6f 6e 27 74 | 20 68 61 76 65 20 61 6e |We don't| have an|
|00001750| 79 20 70 72 6f 74 6f 63 | 6f 6c 2d 73 70 65 63 69 |y protoc|ol-speci|
|00001760| 66 69 63 20 63 6f 64 65 | 2c 20 73 6f 20 74 68 65 |fic code|, so the|
|00001770| 72 65 27 73 20 6e 6f 74 | 68 69 6e 67 20 75 73 65 |re's not|hing use|
|00001780| 66 75 6c 20 74 6f 0d 09 | 2f 2f 09 72 65 74 75 72 |ful to..|//.retur|
|00001790| 6e 2e 0d 09 2a 70 64 77 | 52 65 73 75 6c 74 20 3d |n...*pdw|Result =|
|000017a0| 20 30 3b 0d 09 2a 70 73 | 7a 52 65 73 75 6c 74 20 | 0;..*ps|zResult |
|000017b0| 3d 20 4e 55 4c 4c 3b 0d | 09 72 65 74 75 72 6e 20 |= NULL;.|.return |
|000017c0| 53 5f 4f 4b 3b 0d 7d 0d | 0d 2f 2f 0d 2f 2f 09 43 |S_OK;.}.|.//.//.C|
|000017d0| 42 69 6e 64 69 6e 67 4d | 65 6d 6f 72 79 53 74 72 |BindingM|emoryStr|
|000017e0| 65 61 6d 4e 6f 74 69 66 | 79 3a 3a 4f 6e 57 72 69 |eamNotif|y::OnWri|
|000017f0| 74 65 0d 2f 2f 0d 2f 2f | 09 45 78 74 65 6e 64 73 |te.//.//|.Extends|
|00001800| 20 74 68 65 20 64 65 66 | 61 75 6c 74 20 6d 65 6d | the def|ault mem|
|00001810| 6f 72 79 20 73 74 72 65 | 61 6d 20 69 6d 70 6c 65 |ory stre|am imple|
|00001820| 6d 65 6e 74 61 74 69 6f | 6e 20 62 79 20 6e 6f 74 |mentatio|n by not|
|00001830| 69 66 79 69 6e 67 20 74 | 68 65 20 63 6c 69 65 6e |ifying t|he clien|
|00001840| 74 20 6f 66 0d 2f 2f 09 | 64 61 74 61 20 61 76 61 |t of.//.|data ava|
|00001850| 69 6c 61 62 69 6c 69 74 | 79 2e 0d 2f 2f 0d 0d 69 |ilabilit|y..//..i|
|00001860| 6e 74 33 32 0d 43 42 69 | 6e 64 69 6e 67 4d 65 6d |nt32.CBi|ndingMem|
|00001870| 6f 72 79 53 74 72 65 61 | 6d 4e 6f 74 69 66 79 3a |oryStrea|mNotify:|
|00001880| 3a 4f 6e 57 72 69 74 65 | 28 4e 50 53 74 72 65 61 |:OnWrite|(NPStrea|
|00001890| 6d 20 2a 73 74 72 65 61 | 6d 2c 20 69 6e 74 33 32 |m *strea|m, int32|
|000018a0| 20 6f 66 66 73 65 74 2c | 20 69 6e 74 33 32 20 6c | offset,| int32 l|
|000018b0| 65 6e 2c 0d 09 76 6f 69 | 64 20 2a 62 75 66 66 65 |en,..voi|d *buffe|
|000018c0| 72 29 0d 7b 0d 09 69 6e | 74 33 32 20 42 79 74 65 |r).{..in|t32 Byte|
|000018d0| 73 57 72 69 74 74 65 6e | 3b 0d 09 55 4c 4f 4e 47 |sWritten|;..ULONG|
|000018e0| 20 42 69 6e 64 53 74 61 | 74 75 73 3b 0d 09 44 57 | BindSta|tus;..DW|
|000018f0| 4f 52 44 20 66 42 53 43 | 46 3b 0d 0d 09 2f 2f 09 |ORD fBSC|F;...//.|
|00001900| 54 61 67 20 74 68 65 20 | 73 74 72 65 61 6d 20 73 |Tag the |stream s|
|00001910| 75 63 68 20 74 68 61 74 | 20 72 65 71 75 65 73 74 |uch that| request|
|00001920| 73 20 66 6f 72 20 75 6e | 61 76 61 69 6c 61 62 6c |s for un|availabl|
|00001930| 65 20 64 61 74 61 20 6d | 61 64 65 20 61 67 61 69 |e data m|ade agai|
|00001940| 6e 73 74 20 6f 75 72 0d | 09 2f 2f 09 49 53 74 72 |nst our.|.//.IStr|
|00001950| 65 61 6d 20 72 65 74 75 | 72 6e 20 45 5f 50 45 4e |eam retu|rn E_PEN|
|00001960| 44 49 4e 47 2e 0d 09 6d | 5f 66 41 73 79 6e 63 53 |DING...m|_fAsyncS|
|00001970| 74 72 65 61 6d 49 6e 50 | 72 6f 67 72 65 73 73 20 |treamInP|rogress |
|00001980| 3d 20 54 52 55 45 3b 0d | 0d 09 42 79 74 65 73 57 |= TRUE;.|..BytesW|
|00001990| 72 69 74 74 65 6e 20 3d | 20 43 4d 65 6d 6f 72 79 |ritten =| CMemory|
|000019a0| 4f 6c 65 53 74 72 65 61 | 6d 4e 6f 74 69 66 79 3a |OleStrea|mNotify:|
|000019b0| 3a 4f 6e 57 72 69 74 65 | 28 73 74 72 65 61 6d 2c |:OnWrite|(stream,|
|000019c0| 20 6f 66 66 73 65 74 2c | 20 6c 65 6e 2c 20 62 75 | offset,| len, bu|
|000019d0| 66 66 65 72 29 3b 0d 0d | 09 69 66 20 28 42 79 74 |ffer);..|.if (Byt|
|000019e0| 65 73 57 72 69 74 74 65 | 6e 20 3e 20 30 29 20 7b |esWritte|n > 0) {|
|000019f0| 0d 0d 09 09 69 66 20 28 | 21 6d 5f 66 44 65 6c 69 |....if (|!m_fDeli|
|00001a00| 76 65 72 65 64 46 69 72 | 73 74 4e 6f 74 69 66 79 |veredFir|stNotify|
|00001a10| 29 20 7b 0d 09 09 09 6d | 5f 66 44 65 6c 69 76 65 |) {....m|_fDelive|
|00001a20| 72 65 64 46 69 72 73 74 | 4e 6f 74 69 66 79 20 3d |redFirst|Notify =|
|00001a30| 20 54 52 55 45 3b 0d 09 | 09 09 42 69 6e 64 53 74 | TRUE;..|..BindSt|
|00001a40| 61 74 75 73 20 3d 20 42 | 49 4e 44 53 54 41 54 55 |atus = B|INDSTATU|
|00001a50| 53 5f 42 45 47 49 4e 44 | 4f 57 4e 4c 4f 41 44 44 |S_BEGIND|OWNLOADD|
|00001a60| 41 54 41 3b 0d 09 09 09 | 66 42 53 43 46 20 3d 20 |ATA;....|fBSCF = |
|00001a70| 42 53 43 46 5f 46 49 52 | 53 54 44 41 54 41 4e 4f |BSCF_FIR|STDATANO|
|00001a80| 54 49 46 49 43 41 54 49 | 4f 4e 3b 0d 09 09 7d 20 |TIFICATI|ON;...} |
|00001a90| 65 6c 73 65 20 7b 0d 09 | 09 09 42 69 6e 64 53 74 |else {..|..BindSt|
|00001aa0| 61 74 75 73 20 3d 20 42 | 49 4e 44 53 54 41 54 55 |atus = B|INDSTATU|
|00001ab0| 53 5f 44 4f 57 4e 4c 4f | 41 44 49 4e 47 44 41 54 |S_DOWNLO|ADINGDAT|
|00001ac0| 41 3b 0d 09 09 09 66 42 | 53 43 46 20 3d 20 42 53 |A;....fB|SCF = BS|
|00001ad0| 43 46 5f 49 4e 54 45 52 | 4d 45 44 49 41 54 45 44 |CF_INTER|MEDIATED|
|00001ae0| 41 54 41 4e 4f 54 49 46 | 49 43 41 54 49 4f 4e 3b |ATANOTIF|ICATION;|
|00001af0| 0d 09 09 7d 0d 0d 09 09 | 6d 5f 70 42 69 6e 64 69 |...}....|m_pBindi|
|00001b00| 6e 67 2d 3e 6d 5f 70 62 | 73 63 2d 3e 4f 6e 50 72 |ng->m_pb|sc->OnPr|
|00001b10| 6f 67 72 65 73 73 28 28 | 55 4c 4f 4e 47 29 20 6d |ogress((|ULONG) m|
|00001b20| 5f 53 74 72 65 61 6d 4c | 65 6e 67 74 68 2c 20 0d |_StreamL|ength, .|
|00001b30| 09 09 09 28 55 4c 4f 4e | 47 29 20 6d 5f 53 74 72 |...(ULON|G) m_Str|
|00001b40| 65 61 6d 4c 65 6e 67 74 | 68 2c 20 42 69 6e 64 53 |eamLengt|h, BindS|
|00001b50| 74 61 74 75 73 2c 20 6d | 5f 70 73 7a 55 52 4c 29 |tatus, m|_pszURL)|
|00001b60| 3b 0d 0d 09 09 6d 53 74 | 6f 72 61 67 65 4d 65 64 |;....mSt|orageMed|
|00001b70| 69 75 6d 2e 74 79 6d 65 | 64 20 3d 20 54 59 4d 45 |ium.tyme|d = TYME|
|00001b80| 44 5f 49 53 54 52 45 41 | 4d 3b 0d 09 09 6d 53 74 |D_ISTREA|M;...mSt|
|00001b90| 6f 72 61 67 65 4d 65 64 | 69 75 6d 2e 75 2e 70 73 |orageMed|ium.u.ps|
|00001ba0| 74 6d 20 3d 20 28 4c 50 | 53 54 52 45 41 4d 29 20 |tm = (LP|STREAM) |
|00001bb0| 74 68 69 73 3b 0d 09 09 | 6d 53 74 6f 72 61 67 65 |this;...|mStorage|
|00001bc0| 4d 65 64 69 75 6d 2e 70 | 55 6e 6b 46 6f 72 52 65 |Medium.p|UnkForRe|
|00001bd0| 6c 65 61 73 65 20 3d 20 | 28 4c 50 55 4e 4b 4e 4f |lease = |(LPUNKNO|
|00001be0| 57 4e 29 20 74 68 69 73 | 3b 0d 09 09 41 64 64 52 |WN) this|;...AddR|
|00001bf0| 65 66 28 29 3b 09 09 2f | 2f 20 61 63 63 6f 75 6e |ef();../|/ accoun|
|00001c00| 74 20 66 6f 72 20 6d 53 | 74 6f 72 61 67 65 4d 65 |t for mS|torageMe|
|00001c10| 64 69 75 6d 20 72 65 66 | 65 72 65 6e 63 65 0d 09 |dium ref|erence..|
|00001c20| 09 6d 5f 70 42 69 6e 64 | 69 6e 67 2d 3e 6d 5f 70 |.m_pBind|ing->m_p|
|00001c30| 62 73 63 2d 3e 4f 6e 44 | 61 74 61 41 76 61 69 6c |bsc->OnD|ataAvail|
|00001c40| 61 62 6c 65 28 66 42 53 | 43 46 2c 20 42 79 74 65 |able(fBS|CF, Byte|
|00001c50| 73 57 72 69 74 74 65 6e | 2c 0d 09 09 09 26 67 5f |sWritten|,....&g_|
|00001c60| 4e 75 6c 6c 46 6f 72 6d | 61 74 45 74 63 2c 20 26 |NullForm|atEtc, &|
|00001c70| 6d 53 74 6f 72 61 67 65 | 4d 65 64 69 75 6d 29 3b |mStorage|Medium);|
|00001c80| 0d 0d 09 09 2f 2f 09 49 | 66 20 74 68 65 20 63 6c |....//.I|f the cl|
|00001c90| 69 65 6e 74 20 63 61 6c | 6c 65 64 20 49 42 69 6e |ient cal|led IBin|
|00001ca0| 64 69 6e 67 3a 3a 41 62 | 6f 72 74 2c 20 72 65 74 |ding::Ab|ort, ret|
|00001cb0| 75 72 6e 20 61 6e 20 65 | 72 72 6f 72 20 73 6f 20 |urn an e|rror so |
|00001cc0| 61 73 20 74 6f 0d 09 09 | 2f 2f 09 66 6f 72 63 65 |as to...|//.force|
|00001cd0| 20 74 68 65 20 73 74 72 | 65 61 6d 20 74 6f 20 74 | the str|eam to t|
|00001ce0| 65 72 6d 69 6e 61 74 65 | 2e 0d 09 09 69 66 20 28 |erminate|....if (|
|00001cf0| 6d 5f 70 42 69 6e 64 69 | 6e 67 2d 3e 6d 5f 66 41 |m_pBindi|ng->m_fA|
|00001d00| 62 6f 72 74 65 64 29 0d | 09 09 09 42 79 74 65 73 |borted).|...Bytes|
|00001d10| 57 72 69 74 74 65 6e 20 | 3d 20 2d 31 3b 0d 09 7d |Written |= -1;..}|
|00001d20| 0d 0d 09 2f 2f 09 49 66 | 20 42 79 74 65 73 57 72 |...//.If| BytesWr|
|00001d30| 69 74 74 65 6e 20 69 73 | 20 6e 65 67 61 74 69 76 |itten is| negativ|
|00001d40| 65 2c 20 74 68 65 6e 20 | 74 68 65 20 73 74 72 65 |e, then |the stre|
|00001d50| 61 6d 20 77 69 6c 6c 20 | 62 65 20 74 65 72 6d 69 |am will |be termi|
|00001d60| 6e 61 74 65 64 2e 20 20 | 54 68 65 0d 09 2f 2f 09 |nated. |The..//.|
|00001d70| 63 6c 69 65 6e 74 20 77 | 69 6c 6c 20 62 65 20 6e |client w|ill be n|
|00001d80| 6f 74 69 66 69 65 64 20 | 6f 66 20 74 68 65 20 65 |otified |of the e|
|00001d90| 72 72 6f 72 20 69 6e 20 | 74 68 65 20 4f 6e 44 65 |rror in |the OnDe|
|00001da0| 73 74 72 6f 79 53 74 72 | 65 61 6d 20 6d 65 74 68 |stroyStr|eam meth|
|00001db0| 6f 64 2e 0d 09 72 65 74 | 75 72 6e 20 42 79 74 65 |od...ret|urn Byte|
|00001dc0| 73 57 72 69 74 74 65 6e | 3b 0d 7d 0d 0d 2f 2f 0d |sWritten|;.}..//.|
|00001dd0| 2f 2f 09 43 42 69 6e 64 | 69 6e 67 4d 65 6d 6f 72 |//.CBind|ingMemor|
|00001de0| 79 53 74 72 65 61 6d 4e | 6f 74 69 66 79 3a 3a 4f |yStreamN|otify::O|
|00001df0| 6e 44 65 73 74 72 6f 79 | 53 74 72 65 61 6d 0d 2f |nDestroy|Stream./|
|00001e00| 2f 0d 2f 2f 09 45 78 74 | 65 6e 64 73 20 74 68 65 |/.//.Ext|ends the|
|00001e10| 20 64 65 66 61 75 6c 74 | 20 6d 65 6d 6f 72 79 20 | default| memory |
|00001e20| 73 74 72 65 61 6d 20 69 | 6d 70 6c 65 6d 65 6e 74 |stream i|mplement|
|00001e30| 61 74 69 6f 6e 20 62 79 | 20 6e 6f 74 69 66 79 69 |ation by| notifyi|
|00001e40| 6e 67 20 74 68 65 20 63 | 6c 69 65 6e 74 0d 2f 2f |ng the c|lient.//|
|00001e50| 09 74 68 61 74 20 74 68 | 65 20 62 69 6e 64 69 6e |.that th|e bindin|
|00001e60| 67 20 6f 70 65 72 61 74 | 69 6f 6e 20 69 73 20 63 |g operat|ion is c|
|00001e70| 6f 6d 70 6c 65 74 65 2e | 0d 2f 2f 0d 0d 4e 50 45 |omplete.|.//..NPE|
|00001e80| 72 72 6f 72 0d 43 42 69 | 6e 64 69 6e 67 4d 65 6d |rror.CBi|ndingMem|
|00001e90| 6f 72 79 53 74 72 65 61 | 6d 4e 6f 74 69 66 79 3a |oryStrea|mNotify:|
|00001ea0| 3a 4f 6e 44 65 73 74 72 | 6f 79 53 74 72 65 61 6d |:OnDestr|oyStream|
|00001eb0| 28 4e 50 53 74 72 65 61 | 6d 20 2a 73 74 72 65 61 |(NPStrea|m *strea|
|00001ec0| 6d 2c 20 4e 50 45 72 72 | 6f 72 20 72 65 61 73 6f |m, NPErr|or reaso|
|00001ed0| 6e 29 0d 7b 0d 23 70 72 | 61 67 6d 61 20 75 6e 75 |n).{.#pr|agma unu|
|00001ee0| 73 65 64 20 28 73 74 72 | 65 61 6d 29 0d 09 48 52 |sed (str|eam)..HR|
|00001ef0| 45 53 55 4c 54 20 68 72 | 3b 0d 0d 09 6d 5f 66 41 |ESULT hr|;...m_fA|
|00001f00| 73 79 6e 63 53 74 72 65 | 61 6d 49 6e 50 72 6f 67 |syncStre|amInProg|
|00001f10| 72 65 73 73 20 3d 20 46 | 41 4c 53 45 3b 0d 0d 09 |ress = F|ALSE;...|
|00001f20| 2f 2f 09 59 6f 75 20 77 | 6f 75 6c 64 20 74 68 69 |//.You w|ould thi|
|00001f30| 6e 6b 20 4e 65 74 73 63 | 61 70 65 20 77 6f 75 6c |nk Netsc|ape woul|
|00001f40| 64 20 70 61 73 73 20 74 | 68 65 20 72 69 67 68 74 |d pass t|he right|
|00001f50| 20 72 65 61 73 6f 6e 20 | 63 6f 64 65 20 74 6f 20 | reason |code to |
|00001f60| 75 73 2c 20 62 75 74 20 | 69 74 0d 09 2f 2f 09 61 |us, but |it..//.a|
|00001f70| 6c 77 61 79 73 20 72 65 | 74 75 72 6e 73 20 61 20 |lways re|turns a |
|00001f80| 7a 65 72 6f 20 6f 6e 20 | 73 75 63 63 65 73 73 2c |zero on |success,|
|00001f90| 20 73 6f 20 6d 61 79 62 | 65 20 74 68 65 79 20 77 | so mayb|e they w|
|00001fa0| 61 6e 74 20 4e 50 45 52 | 52 5f 4e 4f 5f 45 52 52 |ant NPER|R_NO_ERR|
|00001fb0| 4f 52 3f 3f 3f 0d 09 69 | 66 20 28 28 72 65 61 73 |OR???..i|f ((reas|
|00001fc0| 6f 6e 20 3d 3d 20 4e 50 | 45 52 52 5f 4e 4f 5f 45 |on == NP|ERR_NO_E|
|00001fd0| 52 52 4f 52 20 7c 7c 20 | 72 65 61 73 6f 6e 20 3d |RROR || |reason =|
|00001fe0| 3d 20 4e 50 52 45 53 5f | 44 4f 4e 45 29 20 26 26 |= NPRES_|DONE) &&|
|00001ff0| 0d 09 09 21 6d 5f 70 42 | 69 6e 64 69 6e 67 2d 3e |...!m_pB|inding->|
|00002000| 6d 5f 66 41 62 6f 72 74 | 65 64 29 20 7b 0d 09 09 |m_fAbort|ed) {...|
|00002010| 2f 2f 09 53 65 6e 64 20 | 74 68 65 20 66 69 6e 61 |//.Send |the fina|
|00002020| 6c 20 70 72 6f 67 72 65 | 73 73 20 6e 6f 74 69 66 |l progre|ss notif|
|00002030| 69 63 61 74 69 6f 6e 2e | 0d 09 09 6d 5f 70 42 69 |ication.|...m_pBi|
|00002040| 6e 64 69 6e 67 2d 3e 6d | 5f 70 62 73 63 2d 3e 4f |nding->m|_pbsc->O|
|00002050| 6e 50 72 6f 67 72 65 73 | 73 28 28 55 4c 4f 4e 47 |nProgres|s((ULONG|
|00002060| 29 20 6d 5f 53 74 72 65 | 61 6d 4c 65 6e 67 74 68 |) m_Stre|amLength|
|00002070| 2c 0d 09 09 09 28 55 4c | 4f 4e 47 29 20 6d 5f 53 |,....(UL|ONG) m_S|
|00002080| 74 72 65 61 6d 4c 65 6e | 67 74 68 2c 20 42 49 4e |treamLen|gth, BIN|
|00002090| 44 53 54 41 54 55 53 5f | 45 4e 44 44 4f 57 4e 4c |DSTATUS_|ENDDOWNL|
|000020a0| 4f 41 44 44 41 54 41 2c | 20 6d 5f 70 73 7a 55 52 |OADDATA,| m_pszUR|
|000020b0| 4c 29 3b 0d 0d 09 09 2f | 2f 09 41 6c 74 68 6f 75 |L);..../|/.Althou|
|000020c0| 67 68 20 74 68 65 20 64 | 61 74 61 20 73 74 72 65 |gh the d|ata stre|
|000020d0| 61 6d 20 68 61 73 6e 27 | 74 20 63 68 61 6e 67 65 |am hasn'|t change|
|000020e0| 64 2c 20 77 65 20 6e 65 | 65 64 20 74 6f 20 73 65 |d, we ne|ed to se|
|000020f0| 6e 64 20 74 68 65 20 6c | 61 73 74 0d 09 09 2f 2f |nd the l|ast...//|
|00002100| 09 64 61 74 61 20 6e 6f | 74 69 66 69 63 61 74 69 |.data no|tificati|
|00002110| 6f 6e 2e 0d 09 09 6d 53 | 74 6f 72 61 67 65 4d 65 |on....mS|torageMe|
|00002120| 64 69 75 6d 2e 74 79 6d | 65 64 20 3d 20 54 59 4d |dium.tym|ed = TYM|
|00002130| 45 44 5f 49 53 54 52 45 | 41 4d 3b 0d 09 09 6d 53 |ED_ISTRE|AM;...mS|
|00002140| 74 6f 72 61 67 65 4d 65 | 64 69 75 6d 2e 75 2e 70 |torageMe|dium.u.p|
|00002150| 73 74 6d 20 3d 20 28 4c | 50 53 54 52 45 41 4d 29 |stm = (L|PSTREAM)|
|00002160| 20 74 68 69 73 3b 0d 09 | 09 41 64 64 52 65 66 28 | this;..|.AddRef(|
|00002170| 29 3b 09 2f 2f 20 61 63 | 63 6f 75 6e 74 20 66 6f |);.// ac|count fo|
|00002180| 72 20 74 68 69 73 20 70 | 6f 69 6e 74 65 72 20 69 |r this p|ointer i|
|00002190| 6e 20 73 74 6f 72 61 67 | 65 20 6d 65 64 69 75 6d |n storag|e medium|
|000021a0| 0d 09 09 6d 53 74 6f 72 | 61 67 65 4d 65 64 69 75 |...mStor|ageMediu|
|000021b0| 6d 2e 70 55 6e 6b 46 6f | 72 52 65 6c 65 61 73 65 |m.pUnkFo|rRelease|
|000021c0| 20 3d 20 28 4c 50 55 4e | 4b 4e 4f 57 4e 29 20 74 | = (LPUN|KNOWN) t|
|000021d0| 68 69 73 3b 0d 09 09 6d | 5f 70 42 69 6e 64 69 6e |his;...m|_pBindin|
|000021e0| 67 2d 3e 6d 5f 70 62 73 | 63 2d 3e 4f 6e 44 61 74 |g->m_pbs|c->OnDat|
|000021f0| 61 41 76 61 69 6c 61 62 | 6c 65 28 42 53 43 46 5f |aAvailab|le(BSCF_|
|00002200| 4c 41 53 54 44 41 54 41 | 4e 4f 54 49 46 49 43 41 |LASTDATA|NOTIFICA|
|00002210| 54 49 4f 4e 2c 0d 09 09 | 09 6d 5f 53 74 72 65 61 |TION,...|.m_Strea|
|00002220| 6d 4c 65 6e 67 74 68 2c | 20 26 67 5f 4e 75 6c 6c |mLength,| &g_Null|
|00002230| 46 6f 72 6d 61 74 45 74 | 63 2c 20 26 6d 53 74 6f |FormatEt|c, &mSto|
|00002240| 72 61 67 65 4d 65 64 69 | 75 6d 29 3b 0d 0d 09 09 |rageMedi|um);....|
|00002250| 68 72 20 3d 20 53 5f 4f | 4b 3b 0d 09 7d 20 65 6c |hr = S_O|K;..} el|
|00002260| 73 65 20 7b 0d 09 09 68 | 72 20 3d 20 45 5f 41 42 |se {...h|r = E_AB|
|00002270| 4f 52 54 3b 0d 09 7d 0d | 0d 09 2f 2f 09 4e 6f 74 |ORT;..}.|..//.Not|
|00002280| 69 66 79 20 74 68 65 20 | 63 61 6c 6c 62 61 63 6b |ify the |callback|
|00002290| 20 74 68 61 74 20 74 68 | 65 20 62 69 6e 64 69 6e | that th|e bindin|
|000022a0| 67 20 68 61 73 20 73 74 | 6f 70 70 65 64 2e 20 20 |g has st|opped. |
|000022b0| 50 6c 75 73 2c 20 77 65 | 27 72 65 20 74 68 72 6f |Plus, we|'re thro|
|000022c0| 75 67 68 0d 09 2f 2f 09 | 77 69 74 68 20 74 68 65 |ugh..//.|with the|
|000022d0| 20 62 69 6e 64 69 6e 67 | 20 6f 62 6a 65 63 74 2c | binding| object,|
|000022e0| 20 73 6f 20 77 65 27 72 | 65 20 72 65 61 64 79 20 | so we'r|e ready |
|000022f0| 74 6f 20 74 68 72 6f 77 | 20 69 74 20 61 77 61 79 |to throw| it away|
|00002300| 2e 20 20 54 68 65 20 63 | 6c 69 65 6e 74 0d 09 2f |. The c|lient../|
|00002310| 2f 09 69 73 20 73 75 70 | 70 6f 73 65 64 20 74 6f |/.is sup|posed to|
|00002320| 20 72 65 6c 65 61 73 65 | 20 74 68 65 20 70 6f 69 | release| the poi|
|00002330| 6e 74 65 72 20 69 6e 20 | 74 68 65 20 4f 6e 53 74 |nter in |the OnSt|
|00002340| 6f 70 42 69 6e 64 69 6e | 67 20 6d 65 74 68 6f 64 |opBindin|g method|
|00002350| 2c 20 73 6f 20 77 65 27 | 6c 6c 0d 09 2f 2f 09 6d |, so we'|ll..//.m|
|00002360| 61 6b 65 20 73 75 72 65 | 20 77 65 20 64 6f 6e 27 |ake sure| we don'|
|00002370| 74 20 6c 65 61 6b 20 61 | 6e 79 74 68 69 6e 67 20 |t leak a|nything |
|00002380| 62 79 20 6a 75 73 74 20 | 64 65 6c 65 74 69 6e 67 |by just |deleting|
|00002390| 20 74 68 65 20 62 69 6e | 64 69 6e 67 2e 0d 09 6d | the bin|ding...m|
|000023a0| 5f 70 42 69 6e 64 69 6e | 67 2d 3e 6d 5f 70 62 73 |_pBindin|g->m_pbs|
|000023b0| 63 2d 3e 4f 6e 53 74 6f | 70 42 69 6e 64 69 6e 67 |c->OnSto|pBinding|
|000023c0| 28 68 72 2c 20 4e 55 4c | 4c 29 3b 0d 09 64 65 6c |(hr, NUL|L);..del|
|000023d0| 65 74 65 20 6d 5f 70 42 | 69 6e 64 69 6e 67 3b 0d |ete m_pB|inding;.|
|000023e0| 09 6d 5f 70 42 69 6e 64 | 69 6e 67 20 3d 20 4e 55 |.m_pBind|ing = NU|
|000023f0| 4c 4c 3b 0d 0d 09 2f 2f | 09 57 65 27 72 65 20 74 |LL;...//|.We're t|
|00002400| 68 72 6f 75 67 68 20 77 | 69 74 68 20 74 68 69 73 |hrough w|ith this|
|00002410| 20 62 69 6e 64 69 6e 67 | 20 63 61 6c 6c 62 61 63 | binding| callbac|
|00002420| 6b 20 6f 62 6a 65 63 74 | 2e 20 20 54 68 65 20 75 |k object|. The u|
|00002430| 73 65 72 20 6d 61 79 20 | 62 65 0d 09 2f 2f 09 68 |ser may |be..//.h|
|00002440| 6f 6c 64 69 6e 67 20 6f | 6e 20 74 6f 20 6f 75 72 |olding o|n to our|
|00002450| 20 73 74 72 65 61 6d 20 | 6f 62 6a 65 63 74 20 74 | stream |object t|
|00002460| 68 6f 75 67 68 2c 20 73 | 6f 20 77 65 20 6d 75 73 |hough, s|o we mus|
|00002470| 74 20 70 61 79 20 61 74 | 74 65 6e 74 69 6f 6e 20 |t pay at|tention |
|00002480| 74 6f 20 6f 75 72 0d 09 | 2f 2f 09 72 65 66 65 72 |to our..|//.refer|
|00002490| 65 6e 63 65 20 63 6f 75 | 6e 74 2e 0d 09 74 68 69 |ence cou|nt...thi|
|000024a0| 73 2d 3e 52 65 6c 65 61 | 73 65 28 29 3b 0d 0d 09 |s->Relea|se();...|
|000024b0| 72 65 74 75 72 6e 20 4e | 50 45 52 52 5f 4e 4f 5f |return N|PERR_NO_|
|000024c0| 45 52 52 4f 52 3b 0d 7d | 0d 0d 2f 2f 0d 2f 2f 09 |ERROR;.}|..//.//.|
|000024d0| 43 42 69 6e 64 69 6e 67 | 46 69 6c 65 53 74 72 65 |CBinding|FileStre|
|000024e0| 61 6d 4e 6f 74 69 66 79 | 3a 3a 49 55 6e 6b 6e 6f |amNotify|::IUnkno|
|000024f0| 77 6e 3a 3a 51 75 65 72 | 79 49 6e 74 65 72 66 61 |wn::Quer|yInterfa|
|00002500| 63 65 0d 2f 2f 0d 0d 53 | 54 44 4d 45 54 48 4f 44 |ce.//..S|TDMETHOD|
|00002510| 49 4d 50 0d 43 42 69 6e | 64 69 6e 67 46 69 6c 65 |IMP.CBin|dingFile|
|00002520| 53 74 72 65 61 6d 4e 6f | 74 69 66 79 3a 3a 51 75 |StreamNo|tify::Qu|
|00002530| 65 72 79 49 6e 74 65 72 | 66 61 63 65 28 52 45 46 |eryInter|face(REF|
|00002540| 49 49 44 20 72 69 69 64 | 2c 20 4c 50 56 4f 49 44 |IID riid|, LPVOID|
|00002550| 20 2a 70 70 76 4f 62 6a | 29 0d 7b 0d 09 48 52 45 | *ppvObj|).{..HRE|
|00002560| 53 55 4c 54 20 68 72 3b | 0d 09 4c 50 56 4f 49 44 |SULT hr;|..LPVOID|
|00002570| 20 70 76 3b 0d 0d 09 69 | 66 20 28 72 69 69 64 20 | pv;...i|f (riid |
|00002580| 3d 3d 20 49 49 44 5f 49 | 55 6e 6b 6e 6f 77 6e 29 |== IID_I|Unknown)|
|00002590| 20 7b 0d 09 09 70 76 20 | 3d 20 28 4c 50 56 4f 49 | {...pv |= (LPVOI|
|000025a0| 44 29 28 4c 50 55 4e 4b | 4e 4f 57 4e 29 20 74 68 |D)(LPUNK|NOWN) th|
|000025b0| 69 73 3b 0d 09 09 2b 2b | 6d 5f 63 52 65 66 3b 0d |is;...++|m_cRef;.|
|000025c0| 09 09 68 72 20 3d 20 53 | 5f 4f 4b 3b 0d 09 7d 20 |..hr = S|_OK;..} |
|000025d0| 65 6c 73 65 20 7b 0d 09 | 09 70 76 20 3d 20 4e 55 |else {..|.pv = NU|
|000025e0| 4c 4c 3b 0d 09 09 68 72 | 20 3d 20 45 5f 4e 4f 49 |LL;...hr| = E_NOI|
|000025f0| 4e 54 45 52 46 41 43 45 | 3b 0d 09 7d 0d 0d 09 2a |NTERFACE|;..}...*|
|00002600| 70 70 76 4f 62 6a 20 3d | 20 70 76 3b 0d 09 72 65 |ppvObj =| pv;..re|
|00002610| 74 75 72 6e 20 68 72 3b | 0d 7d 0d 0d 2f 2f 0d 2f |turn hr;|.}..//./|
|00002620| 2f 09 43 42 69 6e 64 69 | 6e 67 46 69 6c 65 53 74 |/.CBindi|ngFileSt|
|00002630| 72 65 61 6d 4e 6f 74 69 | 66 79 3a 3a 49 55 6e 6b |reamNoti|fy::IUnk|
|00002640| 6e 6f 77 6e 3a 3a 41 64 | 64 52 65 66 0d 2f 2f 0d |nown::Ad|dRef.//.|
|00002650| 0d 53 54 44 4d 45 54 48 | 4f 44 49 4d 50 5f 28 55 |.STDMETH|ODIMP_(U|
|00002660| 4c 4f 4e 47 29 0d 43 42 | 69 6e 64 69 6e 67 46 69 |LONG).CB|indingFi|
|00002670| 6c 65 53 74 72 65 61 6d | 4e 6f 74 69 66 79 3a 3a |leStream|Notify::|
|00002680| 41 64 64 52 65 66 28 76 | 6f 69 64 29 0d 7b 0d 09 |AddRef(v|oid).{..|
|00002690| 72 65 74 75 72 6e 20 2b | 2b 6d 5f 63 52 65 66 3b |return +|+m_cRef;|
|000026a0| 0d 7d 0d 0d 2f 2f 0d 2f | 2f 09 43 42 69 6e 64 69 |.}..//./|/.CBindi|
|000026b0| 6e 67 46 69 6c 65 53 74 | 72 65 61 6d 4e 6f 74 69 |ngFileSt|reamNoti|
|000026c0| 66 79 3a 3a 49 55 6e 6b | 6e 6f 77 6e 3a 3a 52 65 |fy::IUnk|nown::Re|
|000026d0| 6c 65 61 73 65 0d 2f 2f | 0d 0d 53 54 44 4d 45 54 |lease.//|..STDMET|
|000026e0| 48 4f 44 49 4d 50 5f 28 | 55 4c 4f 4e 47 29 0d 43 |HODIMP_(|ULONG).C|
|000026f0| 42 69 6e 64 69 6e 67 46 | 69 6c 65 53 74 72 65 61 |BindingF|ileStrea|
|00002700| 6d 4e 6f 74 69 66 79 3a | 3a 52 65 6c 65 61 73 65 |mNotify:|:Release|
|00002710| 28 76 6f 69 64 29 0d 7b | 0d 09 69 66 20 28 2d 2d |(void).{|..if (--|
|00002720| 6d 5f 63 52 65 66 20 21 | 3d 20 30 29 0d 09 09 72 |m_cRef !|= 0)...r|
|00002730| 65 74 75 72 6e 20 6d 5f | 63 52 65 66 3b 0d 0d 09 |eturn m_|cRef;...|
|00002740| 64 65 6c 65 74 65 20 74 | 68 69 73 3b 0d 09 72 65 |delete t|his;..re|
|00002750| 74 75 72 6e 20 30 3b 0d | 7d 0d 0d 2f 2f 0d 2f 2f |turn 0;.|}..//.//|
|00002760| 09 43 42 69 6e 64 69 6e | 67 46 69 6c 65 53 74 72 |.CBindin|gFileStr|
|00002770| 65 61 6d 4e 6f 74 69 66 | 79 3a 3a 4f 6e 4e 65 77 |eamNotif|y::OnNew|
|00002780| 53 74 72 65 61 6d 0d 2f | 2f 0d 0d 4e 50 45 72 72 |Stream./|/..NPErr|
|00002790| 6f 72 0d 43 42 69 6e 64 | 69 6e 67 46 69 6c 65 53 |or.CBind|ingFileS|
|000027a0| 74 72 65 61 6d 4e 6f 74 | 69 66 79 3a 3a 4f 6e 4e |treamNot|ify::OnN|
|000027b0| 65 77 53 74 72 65 61 6d | 28 4e 50 4d 49 4d 45 54 |ewStream|(NPMIMET|
|000027c0| 79 70 65 20 74 79 70 65 | 2c 20 4e 50 53 74 72 65 |ype type|, NPStre|
|000027d0| 61 6d 20 2a 73 74 72 65 | 61 6d 2c 20 4e 50 42 6f |am *stre|am, NPBo|
|000027e0| 6f 6c 0d 09 73 65 65 6b | 61 62 6c 65 2c 20 75 69 |ol..seek|able, ui|
|000027f0| 6e 74 31 36 20 2a 73 74 | 79 70 65 29 0d 7b 0d 23 |nt16 *st|ype).{.#|
|00002800| 70 72 61 67 6d 61 20 75 | 6e 75 73 65 64 20 28 74 |pragma u|nused (t|
|00002810| 79 70 65 2c 20 73 74 72 | 65 61 6d 2c 20 73 65 65 |ype, str|eam, see|
|00002820| 6b 61 62 6c 65 29 0d 09 | 2f 2f 09 52 45 56 49 45 |kable)..|//.REVIE|
|00002830| 57 3a 20 20 57 65 27 72 | 65 20 6e 6f 74 20 73 65 |W: We'r|e not se|
|00002840| 6e 64 69 6e 67 20 61 6e | 79 20 6e 6f 74 69 66 69 |nding an|y notifi|
|00002850| 63 61 74 69 6f 6e 73 20 | 74 6f 20 74 68 65 20 63 |cations |to the c|
|00002860| 6c 69 65 6e 74 2c 20 62 | 75 74 20 74 68 65 72 65 |lient, b|ut there|
|00002870| 27 73 0d 09 2f 2f 09 6e | 6f 74 20 6d 75 63 68 20 |'s..//.n|ot much |
|00002880| 75 73 65 66 75 6c 20 69 | 6e 66 6f 72 6d 61 74 69 |useful i|nformati|
|00002890| 6f 6e 20 74 68 61 74 20 | 77 65 20 63 61 6e 20 70 |on that |we can p|
|000028a0| 72 6f 76 69 64 65 2e 20 | 20 54 68 65 20 63 6c 69 |rovide. | The cli|
|000028b0| 65 6e 74 20 69 6e 69 74 | 69 61 74 65 64 0d 09 2f |ent init|iated../|
|000028c0| 2f 09 74 68 65 20 64 6f | 77 6e 6c 6f 61 64 2c 20 |/.the do|wnload, |
|000028d0| 73 6f 20 74 68 65 79 20 | 70 72 6f 62 61 62 6c 79 |so they |probably|
|000028e0| 20 64 6f 6e 27 74 20 77 | 61 6e 74 20 74 6f 20 61 | don't w|ant to a|
|000028f0| 62 6f 72 74 20 61 74 20 | 74 68 65 20 76 65 72 79 |bort at |the very|
|00002900| 20 73 74 61 72 74 20 6f | 66 0d 09 2f 2f 09 74 68 | start o|f..//.th|
|00002910| 65 20 70 72 6f 63 65 73 | 73 2e 20 20 54 68 65 20 |e proces|s. The |
|00002920| 6e 65 78 74 20 6e 6f 74 | 69 66 69 63 61 74 69 6f |next not|ificatio|
|00002930| 6e 20 77 65 20 67 65 74 | 20 62 61 63 6b 20 66 72 |n we get| back fr|
|00002940| 6f 6d 20 74 68 65 20 62 | 72 6f 77 73 65 72 20 69 |om the b|rowser i|
|00002950| 73 20 74 68 65 0d 09 2f | 2f 09 66 69 6c 65 6e 61 |s the../|/.filena|
|00002960| 6d 65 20 6f 66 20 74 68 | 65 20 64 61 74 61 2c 20 |me of th|e data, |
|00002970| 73 6f 20 77 65 20 74 68 | 65 72 65 27 73 20 6e 6f |so we th|ere's no|
|00002980| 74 68 69 6e 67 20 74 6f | 20 61 62 6f 72 74 2e 0d |thing to| abort..|
|00002990| 09 2a 73 74 79 70 65 20 | 3d 20 4e 50 5f 41 53 46 |.*stype |= NP_ASF|
|000029a0| 49 4c 45 3b 0d 09 72 65 | 74 75 72 6e 20 4e 50 45 |ILE;..re|turn NPE|
|000029b0| 52 52 5f 4e 4f 5f 45 52 | 52 4f 52 3b 0d 7d 0d 0d |RR_NO_ER|ROR;.}..|
|000029c0| 2f 2f 0d 2f 2f 09 43 42 | 69 6e 64 69 6e 67 46 69 |//.//.CB|indingFi|
|000029d0| 6c 65 53 74 72 65 61 6d | 4e 6f 74 69 66 79 3a 3a |leStream|Notify::|
|000029e0| 4f 6e 53 74 72 65 61 6d | 41 73 46 69 6c 65 0d 2f |OnStream|AsFile./|
|000029f0| 2f 0d 0d 76 6f 69 64 0d | 43 42 69 6e 64 69 6e 67 |/..void.|CBinding|
|00002a00| 46 69 6c 65 53 74 72 65 | 61 6d 4e 6f 74 69 66 79 |FileStre|amNotify|
|00002a10| 3a 3a 4f 6e 53 74 72 65 | 61 6d 41 73 46 69 6c 65 |::OnStre|amAsFile|
|00002a20| 28 4e 50 53 74 72 65 61 | 6d 20 2a 73 74 72 65 61 |(NPStrea|m *strea|
|00002a30| 6d 2c 20 63 6f 6e 73 74 | 20 63 68 61 72 2a 20 66 |m, const| char* f|
|00002a40| 6e 61 6d 65 29 0d 7b 0d | 23 70 72 61 67 6d 61 20 |name).{.|#pragma |
|00002a50| 75 6e 75 73 65 64 20 28 | 73 74 72 65 61 6d 29 0d |unused (|stream).|
|00002a60| 09 48 52 45 53 55 4c 54 | 20 68 72 20 3d 20 53 5f |.HRESULT| hr = S_|
|00002a70| 4f 4b 3b 0d 0d 09 69 66 | 20 28 66 6e 61 6d 65 20 |OK;...if| (fname |
|00002a80| 21 3d 20 4e 55 4c 4c 29 | 0d 09 7b 0d 09 09 2f 2f |!= NULL)|..{...//|
|00002a90| 09 4e 6f 74 65 20 74 68 | 61 74 20 77 65 20 70 61 |.Note th|at we pa|
|00002aa0| 73 73 20 6f 75 72 73 65 | 6c 76 65 73 20 61 73 20 |ss ourse|lves as |
|00002ab0| 74 68 65 20 49 55 6e 6b | 6e 6f 77 6e 20 74 68 61 |the IUnk|nown tha|
|00002ac0| 74 20 77 69 6c 6c 20 72 | 65 6c 65 61 73 65 20 74 |t will r|elease t|
|00002ad0| 68 69 73 0d 09 09 2f 2f | 09 72 65 73 6f 75 72 63 |his...//|.resourc|
|00002ae0| 65 2e 20 20 44 65 66 61 | 75 6c 74 20 62 65 68 61 |e. Defa|ult beha|
|00002af0| 76 69 6f 72 20 66 6f 72 | 20 74 68 65 20 54 59 4d |vior for| the TYM|
|00002b00| 45 44 5f 46 49 4c 45 4e | 41 4d 45 20 74 79 70 65 |ED_FILEN|AME type|
|00002b10| 20 69 73 20 74 6f 0d 09 | 09 2f 2f 09 64 65 6c 65 | is to..|.//.dele|
|00002b20| 74 65 20 74 68 65 20 66 | 69 6c 65 2c 20 62 75 74 |te the f|ile, but|
|00002b30| 20 77 65 20 77 61 6e 74 | 20 74 6f 20 6b 65 65 70 | we want| to keep|
|00002b40| 20 69 74 20 61 72 6f 75 | 6e 64 20 69 6e 20 74 68 | it arou|nd in th|
|00002b50| 65 20 63 61 63 68 65 2e | 20 20 50 6c 75 73 2c 0d |e cache.| Plus,.|
|00002b60| 09 09 2f 2f 09 77 65 20 | 6d 61 79 20 77 61 6e 74 |..//.we |may want|
|00002b70| 20 74 6f 20 64 6f 20 73 | 6f 6d 65 74 68 69 6e 67 | to do s|omething|
|00002b80| 20 6d 6f 72 65 20 69 6e | 20 74 68 65 20 66 75 74 | more in| the fut|
|00002b90| 75 72 65 2e 20 20 54 68 | 65 20 66 69 6c 65 6e 61 |ure. Th|e filena|
|00002ba0| 6d 65 20 69 73 0d 09 09 | 2f 2f 09 61 6c 77 61 79 |me is...|//.alway|
|00002bb0| 73 20 72 65 6c 65 61 73 | 65 64 20 62 79 20 74 68 |s releas|ed by th|
|00002bc0| 65 20 63 6c 69 65 6e 74 | 20 28 73 65 65 20 52 65 |e client| (see Re|
|00002bd0| 6c 65 61 73 65 53 74 67 | 4d 65 64 69 75 6d 29 2e |leaseStg|Medium).|
|00002be0| 0d 09 09 6d 53 74 6f 72 | 61 67 65 4d 65 64 69 75 |...mStor|ageMediu|
|00002bf0| 6d 2e 74 79 6d 65 64 20 | 3d 20 6d 42 69 6e 64 54 |m.tymed |= mBindT|
|00002c00| 79 70 65 3b 0d 09 09 6d | 53 74 6f 72 61 67 65 4d |ype;...m|StorageM|
|00002c10| 65 64 69 75 6d 2e 70 55 | 6e 6b 46 6f 72 52 65 6c |edium.pU|nkForRel|
|00002c20| 65 61 73 65 20 3d 20 28 | 4c 50 55 4e 4b 4e 4f 57 |ease = (|LPUNKNOW|
|00002c30| 4e 29 20 74 68 69 73 3b | 0d 09 09 69 66 28 6d 42 |N) this;|...if(mB|
|00002c40| 69 6e 64 54 79 70 65 20 | 3d 3d 20 54 59 4d 45 44 |indType |== TYMED|
|00002c50| 5f 46 49 4c 45 29 0d 09 | 09 7b 0d 09 09 09 6d 53 |_FILE)..|.{....mS|
|00002c60| 74 6f 72 61 67 65 4d 65 | 64 69 75 6d 2e 75 2e 6c |torageMe|dium.u.l|
|00002c70| 70 73 7a 46 69 6c 65 4e | 61 6d 65 20 3d 20 4f 6c |pszFileN|ame = Ol|
|00002c80| 65 53 74 72 64 75 70 28 | 66 6e 61 6d 65 29 3b 0d |eStrdup(|fname);.|
|00002c90| 09 09 09 69 66 28 6d 53 | 74 6f 72 61 67 65 4d 65 |...if(mS|torageMe|
|00002ca0| 64 69 75 6d 2e 75 2e 6c | 70 73 7a 46 69 6c 65 4e |dium.u.l|pszFileN|
|00002cb0| 61 6d 65 20 3d 3d 20 4e | 55 4c 4c 29 0d 09 09 09 |ame == N|ULL)....|
|00002cc0| 09 68 72 20 3d 20 45 5f | 4f 55 54 4f 46 4d 45 4d |.hr = E_|OUTOFMEM|
|00002cd0| 4f 52 59 3b 0d 09 09 7d | 0d 09 09 65 6c 73 65 20 |ORY;...}|...else |
|00002ce0| 69 66 28 6d 42 69 6e 64 | 54 79 70 65 20 3d 3d 20 |if(mBind|Type == |
|00002cf0| 54 59 4d 45 44 5f 46 53 | 50 29 0d 09 09 7b 0d 09 |TYMED_FS|P)...{..|
|00002d00| 09 09 6d 53 74 6f 72 61 | 67 65 4d 65 64 69 75 6d |..mStora|geMedium|
|00002d10| 2e 75 2e 70 46 53 53 70 | 65 63 20 3d 20 28 46 53 |.u.pFSSp|ec = (FS|
|00002d20| 53 70 65 63 2a 29 43 6f | 54 61 73 6b 4d 65 6d 41 |Spec*)Co|TaskMemA|
|00002d30| 6c 6c 6f 63 28 73 69 7a | 65 6f 66 28 46 53 53 70 |lloc(siz|eof(FSSp|
|00002d40| 65 63 29 29 3b 0d 09 09 | 09 69 66 28 6d 53 74 6f |ec));...|.if(mSto|
|00002d50| 72 61 67 65 4d 65 64 69 | 75 6d 2e 75 2e 70 46 53 |rageMedi|um.u.pFS|
|00002d60| 53 70 65 63 20 3d 3d 20 | 4e 55 4c 4c 29 0d 09 09 |Spec == |NULL)...|
|00002d70| 09 09 68 72 20 3d 20 45 | 5f 4f 55 54 4f 46 4d 45 |..hr = E|_OUTOFME|
|00002d80| 4d 4f 52 59 3b 0d 09 09 | 09 65 6c 73 65 0d 09 09 |MORY;...|.else...|
|00002d90| 09 7b 0d 09 09 09 09 53 | 74 72 32 35 35 20 46 69 |.{.....S|tr255 Fi|
|00002da0| 6c 65 4e 61 6d 65 3b 0d | 09 09 09 09 0d 09 09 09 |leName;.|........|
|00002db0| 09 46 69 6c 65 4e 61 6d | 65 5b 30 5d 20 3d 20 73 |.FileNam|e[0] = s|
|00002dc0| 74 72 6c 65 6e 28 66 6e | 61 6d 65 29 3b 0d 09 09 |trlen(fn|ame);...|
|00002dd0| 09 09 73 74 72 6e 63 70 | 79 28 28 63 68 61 72 2a |..strncp|y((char*|
|00002de0| 29 26 46 69 6c 65 4e 61 | 6d 65 5b 31 5d 2c 20 66 |)&FileNa|me[1], f|
|00002df0| 6e 61 6d 65 2c 20 46 69 | 6c 65 4e 61 6d 65 5b 30 |name, Fi|leName[0|
|00002e00| 5d 29 3b 0d 09 09 09 09 | 46 53 4d 61 6b 65 46 53 |]);.....|FSMakeFS|
|00002e10| 53 70 65 63 28 30 2c 20 | 30 2c 20 46 69 6c 65 4e |Spec(0, |0, FileN|
|00002e20| 61 6d 65 2c 20 6d 53 74 | 6f 72 61 67 65 4d 65 64 |ame, mSt|orageMed|
|00002e30| 69 75 6d 2e 75 2e 70 46 | 53 53 70 65 63 29 3b 0d |ium.u.pF|SSpec);.|
|00002e40| 09 09 09 7d 0d 09 09 7d | 0d 09 09 69 66 20 28 68 |...}...}|...if (h|
|00002e50| 72 20 3d 3d 20 53 5f 4f | 4b 29 0d 09 09 7b 0d 09 |r == S_O|K)...{..|
|00002e60| 09 09 2b 2b 6d 5f 63 52 | 65 66 3b 09 09 09 09 20 |..++m_cR|ef;.... |
|00002e70| 20 20 2f 2f 09 41 63 63 | 6f 75 6e 74 20 66 6f 72 | //.Acc|ount for|
|00002e80| 20 27 6d 53 74 6f 72 61 | 67 65 4d 65 64 69 75 6d | 'mStora|geMedium|
|00002e90| 27 20 72 65 66 65 72 65 | 6e 63 65 0d 09 09 09 6d |' refere|nce....m|
|00002ea0| 5f 70 42 69 6e 64 69 6e | 67 2d 3e 6d 5f 70 62 73 |_pBindin|g->m_pbs|
|00002eb0| 63 2d 3e 4f 6e 44 61 74 | 61 41 76 61 69 6c 61 62 |c->OnDat|aAvailab|
|00002ec0| 6c 65 28 42 53 43 46 5f | 4c 41 53 54 44 41 54 41 |le(BSCF_|LASTDATA|
|00002ed0| 4e 4f 54 49 46 49 43 41 | 54 49 4f 4e 2c 20 30 2c |NOTIFICA|TION, 0,|
|00002ee0| 0d 09 09 09 09 26 67 5f | 4e 75 6c 6c 46 6f 72 6d |.....&g_|NullForm|
|00002ef0| 61 74 45 74 63 2c 20 26 | 6d 53 74 6f 72 61 67 65 |atEtc, &|mStorage|
|00002f00| 4d 65 64 69 75 6d 29 3b | 0d 09 09 7d 0d 09 7d 20 |Medium);|...}..} |
|00002f10| 65 6c 73 65 20 7b 0d 09 | 09 68 72 20 3d 20 45 5f |else {..|.hr = E_|
|00002f20| 46 41 49 4c 3b 0d 09 7d | 0d 0d 09 2f 2f 09 4e 6f |FAIL;..}|...//.No|
|00002f30| 74 69 66 79 20 74 68 65 | 20 63 61 6c 6c 62 61 63 |tify the| callbac|
|00002f40| 6b 20 74 68 61 74 20 74 | 68 65 20 62 69 6e 64 69 |k that t|he bindi|
|00002f50| 6e 67 20 68 61 73 20 73 | 74 6f 70 70 65 64 2e 20 |ng has s|topped. |
|00002f60| 20 50 6c 75 73 2c 20 77 | 65 27 72 65 20 74 68 72 | Plus, w|e're thr|
|00002f70| 6f 75 67 68 0d 09 2f 2f | 09 77 69 74 68 20 74 68 |ough..//|.with th|
|00002f80| 65 20 62 69 6e 64 69 6e | 67 20 6f 62 6a 65 63 74 |e bindin|g object|
|00002f90| 2c 20 73 6f 20 77 65 27 | 72 65 20 72 65 61 64 79 |, so we'|re ready|
|00002fa0| 20 74 6f 20 74 68 72 6f | 77 20 69 74 20 61 77 61 | to thro|w it awa|
|00002fb0| 79 2e 20 20 54 68 65 20 | 63 6c 69 65 6e 74 0d 09 |y. The |client..|
|00002fc0| 2f 2f 09 69 73 20 73 75 | 70 70 6f 73 65 64 20 74 |//.is su|pposed t|
|00002fd0| 6f 20 72 65 6c 65 61 73 | 65 20 74 68 65 20 70 6f |o releas|e the po|
|00002fe0| 69 6e 74 65 72 20 69 6e | 20 74 68 65 20 4f 6e 53 |inter in| the OnS|
|00002ff0| 74 6f 70 42 69 6e 64 69 | 6e 67 20 6d 65 74 68 6f |topBindi|ng metho|
|00003000| 64 2c 20 73 6f 20 77 65 | 27 6c 6c 0d 09 2f 2f 09 |d, so we|'ll..//.|
|00003010| 6d 61 6b 65 20 73 75 72 | 65 20 77 65 20 64 6f 6e |make sur|e we don|
|00003020| 27 74 20 6c 65 61 6b 20 | 61 6e 79 74 68 69 6e 67 |'t leak |anything|
|00003030| 20 62 79 20 6a 75 73 74 | 20 64 65 6c 65 74 69 6e | by just| deletin|
|00003040| 67 20 74 68 65 20 62 69 | 6e 64 69 6e 67 2e 0d 09 |g the bi|nding...|
|00003050| 6d 5f 70 42 69 6e 64 69 | 6e 67 2d 3e 6d 5f 70 62 |m_pBindi|ng->m_pb|
|00003060| 73 63 2d 3e 4f 6e 53 74 | 6f 70 42 69 6e 64 69 6e |sc->OnSt|opBindin|
|00003070| 67 28 68 72 2c 20 4e 55 | 4c 4c 29 3b 0d 09 64 65 |g(hr, NU|LL);..de|
|00003080| 6c 65 74 65 20 6d 5f 70 | 42 69 6e 64 69 6e 67 3b |lete m_p|Binding;|
|00003090| 0d 09 6d 5f 70 42 69 6e | 64 69 6e 67 20 3d 20 4e |..m_pBin|ding = N|
|000030a0| 55 4c 4c 3b 0d 7d 0d 0d | 2f 2f 0d 2f 2f 09 43 42 |ULL;.}..|//.//.CB|
|000030b0| 69 6e 64 69 6e 67 46 69 | 6c 65 53 74 72 65 61 6d |indingFi|leStream|
|000030c0| 4e 6f 74 69 66 79 3a 3a | 4f 6e 44 65 73 74 72 6f |Notify::|OnDestro|
|000030d0| 79 53 74 72 65 61 6d 0d | 2f 2f 0d 0d 4e 50 45 72 |yStream.|//..NPEr|
|000030e0| 72 6f 72 0d 43 42 69 6e | 64 69 6e 67 46 69 6c 65 |ror.CBin|dingFile|
|000030f0| 53 74 72 65 61 6d 4e 6f | 74 69 66 79 3a 3a 4f 6e |StreamNo|tify::On|
|00003100| 44 65 73 74 72 6f 79 53 | 74 72 65 61 6d 28 4e 50 |DestroyS|tream(NP|
|00003110| 53 74 72 65 61 6d 20 2a | 73 74 72 65 61 6d 2c 20 |Stream *|stream, |
|00003120| 4e 50 45 72 72 6f 72 20 | 72 65 61 73 6f 6e 29 0d |NPError |reason).|
|00003130| 7b 0d 23 70 72 61 67 6d | 61 20 75 6e 75 73 65 64 |{.#pragm|a unused|
|00003140| 20 28 73 74 72 65 61 6d | 2c 20 72 65 61 73 6f 6e | (stream|, reason|
|00003150| 29 0d 09 2f 2f 09 54 68 | 65 20 63 6c 69 65 6e 74 |)..//.Th|e client|
|00003160| 20 6d 61 79 20 73 74 69 | 6c 6c 20 68 61 76 65 20 | may sti|ll have |
|00003170| 61 20 72 65 66 65 72 65 | 6e 63 65 20 74 6f 20 6f |a refere|nce to o|
|00003180| 75 72 20 6f 62 6a 65 63 | 74 20 66 72 6f 6d 20 74 |ur objec|t from t|
|00003190| 68 65 20 53 54 47 4d 45 | 44 49 55 4d 0d 09 2f 2f |he STGME|DIUM..//|
|000031a0| 09 73 74 72 75 63 74 75 | 72 65 2e 0d 09 74 68 69 |.structu|re...thi|
|000031b0| 73 2d 3e 52 65 6c 65 61 | 73 65 28 29 3b 0d 09 72 |s->Relea|se();..r|
|000031c0| 65 74 75 72 6e 20 4e 50 | 45 52 52 5f 4e 4f 5f 45 |eturn NP|ERR_NO_E|
|000031d0| 52 52 4f 52 3b 0d 7d 0d | 00 00 00 00 00 00 00 00 |RROR;.}.|........|
|000031e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000031f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003200| 00 00 01 00 00 00 01 7c | 00 00 00 7c 00 00 00 5e |.......||...|...^|
|00003210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003230| 0c 78 62 69 6e 64 69 6e | 67 2e 63 70 70 6e 02 00 |.xbindin|g.cppn..|
|00003240| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00003250| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00003260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003270| 00 00 b0 56 8e 18 00 00 | 00 00 00 00 01 da 00 00 |...V....|........|
|00003280| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003290| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000032f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003300| 00 00 00 1e 00 63 01 68 | 03 2d 03 fb 00 63 01 68 |.....c.h|.-...c.h|
|00003310| 03 2d 03 fb 00 00 00 00 | 00 00 00 00 00 00 00 00 |.-......|........|
|00003320| 00 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.....H..|Monaco..|
|00003330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003340| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 63 01 68 |........|.....c.h|
|00003350| 03 2d 03 fb 00 63 01 68 | 03 2d 03 fb b0 0b be f8 |.-...c.h|.-......|
|00003360| 00 00 2d b6 00 00 2d b6 | 00 00 27 f3 01 00 00 00 |..-...-.|..'.....|
|00003370| 00 02 00 00 00 00 00 04 | 00 01 00 01 00 00 01 00 |........|........|
|00003380| 00 00 01 7c 00 00 00 7c | 00 00 00 5e 03 89 3e 3c |...|...||...^..><|
|00003390| 24 ba 00 00 00 1c 00 5e | 00 01 4d 50 53 52 00 02 |$......^|..MPSR..|
|000033a0| 00 12 4d 57 42 42 00 00 | 00 36 03 f0 ff ff 00 00 |..MWBB..|.6......|
|000033b0| 00 00 00 00 00 00 03 ed | ff ff 00 00 00 22 00 00 |........|....."..|
|000033c0| 00 00 03 ef ff ff 00 00 | 00 6e 00 00 00 00 03 f0 |........|.n......|
|000033d0| ff ff 00 00 00 74 00 00 | 00 00 00 00 00 00 00 00 |.....t..|........|
|000033e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+